Possible Duplicate:
How can I combine multiple rows into a comma-delimited list in Oracle?
I have a table that stores data in the following manner-
60333,120102,20120502,010000,1,2
60333,120102,20120502,020000,3,4
60333,120102,20120502,030000,5,6
60333,120102,20120502,040000,7,8
61663,120103,20120502,010000,9,10
61663,120103,20120502,020000,11,12
61663,120103,20120502,030000,13,14
61663,120103,20120502,040000,15,16
60333,120102,20120503,010000,17,18
60333,120102,20120503,020000,19,20
60333,120102,20120503,030000,21,22
60333,120102,20120503,040000,23,24
I am expected to show the output like below:
60333,120102,20120502,1,2,3,4,5,6,7,8
60333,120102,20120503,17,18,19,20,21,22,23,24
61663,120103,20120502,,9,10,11,12,13,14 ,15,16
For a unique 60333,120102 and Date all the data is required to be shown in one line instead of 4.