I have 2 csv files. In one file I have a phone number with prices and in the second file I have a phone number with the name of its owner.
First file: file1.csv
491732234332;30,99
491723427343;12,59
491732097232;33,31
Second file: file2.csv
01732/234332;Ben Jefferson
01723/427343;Jon Doe
01732/097232;Benjamin Franklin
My problem is, that the phone number columns are formatted differently and I can not find a way to compare them.
Desired output is:
01732/234332;30,99;Ben Jefferson
01723/427343;12,59;Jon Doe
01732/097232;33,31;Benjamin Franklin
My sql statement is
create temp table FILETB1
(phonenr char(30),
price char(30)
);
create temp table FILETB2
(phonenr char(40),
owner char(60)
);
load from "file1.csv"
insert into FILETB1;
load from "file2.csv"
insert into FILETB2;
unload to "output.csv"
select FILETB1.phonenr, FILETB1.price, FILETB2.owner
from FILETB1, FILETB2
where FILETB1.phonenr = FILETB2.phonenr
How do I have to modify my where clause to be able to compare both columns?
We are working on linux with IBM INFORMIX-SQL Version 7.50.UC5 which makes finding a working solution not easier since many functions are not supported...
Any help is highly appreciated!