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
  • 93,432
  • 11
  • 126
  • 171
d-man
  • 55,965
  • 82
  • 204
  • 290
  • 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,202
  • 2
  • 21
  • 33
0

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

Jokke Heikkilä
  • 898
  • 1
  • 8
  • 17