Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merge 2 Flat Files and put all columns into 1 row

Status
Not open for further replies.

perlprg123

Programmer
Jun 30, 2010
1
US
Hi
I needed some logic for a problem I am facing..Following are the file formats we have :

file 1 format
f1 f2 f3
tom prog 1
john foot 2

File2 Format
f4 f5 f6
22 a 1
33 b 1
44 c 1
55 a 2
66 b 2


We need to merge the 2 files and normalize the data so that data looks in the following form. Joining port between 2 files are f3 & f6.

f1 f2 f3 f6 f4_a f5_a f4_b f5_b f4_c f5_c
tom prog 1 1 22 a 33 b 44 c
john foot 2 2 55 a 66 b null null


Any Help will be appreciated

Thanks




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top