Row to column conversion [message #246443] |
Thu, 21 June 2007 00:29  |
arunvijay_1983
Messages: 4 Registered: June 2007
|
Junior Member |
|
|
Hi Frenz,
I need to concatenate a column that is present in more 2(or more) rows into a column in a single row.
i will first tel my requirement thro a example.
This is how the data look like.
COL1 COL2 COL3 COL4 COL5 COL6
---------- --- ------------ ------------ ---- ---------
4338307033 013 490082538666 GROWTH GROW 5XF013745
4338307033 013 490082538666 INCOME INCO 5XF013745
4191315714 013 416004775485 INCOME I NN3917387
i want to concatenate col4 values(and put in a single row)if col1,col2,col3,col6 are same.. i want the output like the following
COL1 COL2 COL3 COL4 COL5 COL6
---------- --- ------------ ------------- ---- ---------
4338307033 013 490082538666 GROWTH,INCOME GROW 5XF013745
4191315714 013 416004775485 INCOME I NN3917387
Original Record1 and record2 have col1,col2,col3,col6 to be the same. So i want to concatenate col4 values for those records and put as 'Growth,Income' in a single record - (this is new record1). Since Orginal record3 is single, we simply put 'Income'(this is new record2).
Hope i have made myself clear. let me know if i am not clear. Pls help me in this case.
[Updated on: Thu, 21 June 2007 01:21] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|