maddyforums
Programmer
Can someone please help me out in writing the Sql to concatenate the Text_desc for each code for all the seq_nos in the ascending order of seq_no and load into the target table.
Source table : S1
Code Seq_no Text_desc
---------------------------
1579 0 BCN5, CO20, ER75
1579 1 FP5, WC6, MATW, OPRH
1579 2 T
1600 0 TW, FP5, AS5, MHSA15, DME20
1600 1 ER100, UR40
Target table: T1
Text_desc (concatenate all the strings for each code in ascending order of seq_no)
code Text_desc
----- ----------------
1579 BCN5, CO20, ER75FP5, WC6, MATW, OPRHT
1600 TW, FP5, AS5, MHSA15, DME20ER100, UR40
Thanks,
Maddy
Source table : S1
Code Seq_no Text_desc
---------------------------
1579 0 BCN5, CO20, ER75
1579 1 FP5, WC6, MATW, OPRH
1579 2 T
1600 0 TW, FP5, AS5, MHSA15, DME20
1600 1 ER100, UR40
Target table: T1
Text_desc (concatenate all the strings for each code in ascending order of seq_no)
code Text_desc
----- ----------------
1579 BCN5, CO20, ER75FP5, WC6, MATW, OPRHT
1600 TW, FP5, AS5, MHSA15, DME20ER100, UR40
Thanks,
Maddy