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.

Need Help in writing SQL QUERY

639485Nov 5 2008 — edited Nov 6 2008
Hi All,

I need your help to write the query for the following situation. The query should be SQL query. There is no front end concept involved here.
There is a table say ABC having following entries. You can think that Col1 contains standard, Col2 contains Name, Col3 and Col4 contains the grade.
Following is just an example and the number of rows in actual scenario is more.
Col1    Col2     Col3     Col4
 
5th     RAM      A1       C1 
5th     RAM      B1       D1 
6th     HARI     M1       N1
6th     HARI     P1       Q1 
6th     HARI     R1        S1
 
I need a query to create a view XYZ which will give me rows in following way.
Col1      Col2    Col3            Col4
5th       RAM    A1,B1         C1,D1 
6th       HARI   M1,P1,R1    N1,Q1,S1
 
Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2008
Added on Nov 5 2008
9 comments
3,644 views