0
select col1 from tablename

returns 2 rows, I want to concat these two data rows into a single column separated by a comma.

Olivier Jacot-Descombes
  • 104,806
  • 13
  • 138
  • 188
d-man
  • 57,473
  • 85
  • 212
  • 296
  • possible duplicate of [How can I combine multiple rows into a comma-delimited list in Oracle?](http://stackoverflow.com/questions/468990/how-can-i-combine-multiple-rows-into-a-comma-delimited-list-in-oracle) – Ben Nov 15 '12 at 20:58

2 Answers2

0

You can write a cursor to loop through the returned rows one by one and concatenate as you like.

Johnbabu Koppolu
  • 3,212
  • 2
  • 22
  • 34
0

Here are some examples of same kind of situation: http://www.dba-oracle.com/t_converting_rows_columns.htm

Jokke Heikkilä
  • 918
  • 1
  • 8
  • 17