Page 1 of 1

merge Column level

Posted: Mon May 16, 2005 12:10 pm
by New2DS
Two input flat files with two columns each

Code: Select all

File 1:
Rec_Cnt  Total_Amount
125      5000.00

File 2:
Rec_cnt  Total_Amount
275	 15000.00

OutputFile: Record count from the second file and total amount from the first file.
Rec_cnt  Total_Amount
275	 5000.00
There are no keys in the two files. The way I tried is to add a dummy key to both files and coping one of the file to a hash and doing a lookup on the dummy key and taking the required columns on the output. It worked but like to know is there any efficient way of doing this?

thanks

Posted: Tue May 17, 2005 8:09 am
by Sainath.Srinivasan
Perform a 'paste' command in Unix.

Posted: Tue May 17, 2005 8:34 am
by talk2shaanc
Through datastage, i dont think there is anything better than the logic you are already using.