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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Query Writing

459816Jan 31 2006 — edited Jun 11 2008
Hi,
I have a table with data stored in following format.

Col1 Col2 Col3
------------------------
P1 A 101102
P1 A 103104
P1 B 102105
P2 A 101105
P2 B 101103
P2 C 102104

Want to have query that will retrive the records in the following format
and store them in a staging table.

Col1 Col2 Col3
------------------------
P1 A,A,B I101,I102,I103,I104,I102,I105
P2 A,B,C I101,I105,I101,I103,I102,I104

How should i write the query? Can any one give me the solution.

Can it be done with a single query or i need to write a procedure or function to do this. If so then solution will be very much helpful.

Regards

Swadhin

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 9 2008
Added on Jan 31 2006
6 comments
3,667 views