Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multiple records in single row

am430682leJul 8 2013 — edited Jul 9 2013

Hi Gurus,

I want to insert multiple records in a single row.

Example:  I have a below query

select '"'||c1||'","'||c2||'","'||c3||'"'

from (

select 'ABC' as C1,

'ZYX' as C2,

'TEST' AS c3

from dual

union

select 'A1' as C1,

'a2' as C2,

'A3' AS c3

from dual

)

And I want to insert the above 2 records in table T1 as a single row as below:

"A1","a2","A3"

"ABC","ZYX","TEST"

Column1

"A1","a2","A3"

"ABC","ZYX","TEST"

Please help me to figure out this.

Thanks in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2013
Added on Jul 8 2013
6 comments
633 views