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!

Pivot Unpivot Requirement

IniyavanJul 16 2018 — edited Jul 16 2018

Hi friends,

Could you please help me to complete this query?

I have a table like this:

(I know it is not a good design. :-))

Table NameColumn NameRow Serial Number Value
Table_OneColumn_One1101
Table_OneColumn_Two1Arun
Table_OneColumn_Three101-Jan-2018
Table_OneColumn_Four1Red
Table_OneColumn_One2102
Table_OneColumn_Two2Bala
Table_OneColumn_Three202-Jan-2018
Table_OneColumn_Four2Blue
Table_TwoColumn_One1201
Table_TwoColumn_Two1Chitra
Table_TwoColumn_One2202
Table_TwoColumn_Two2David
Table_TwoColumn_One3203
Table_TwoColumn_Two3Elango

And the requirement is to write a query to get Table Name as input and return output like...

For "Table_One" input, the output should be

Serial NoColumn_OneColumn_TwoColumn_ThreeColumn_Four
1101Arun01-Jan-2018Red
2102Bala02-Jan-2018Blue

For "Table_Two" input, the output should be

Serial NoColumn_OneColumn_Two
1201Chitra
2202David
3203Elango

SQL query or any PL/SQL approach is fine.

Thanks in advance!

This post has been answered by mNem on Jul 16 2018
Jump to Answer

Comments

Hi
pls check the following link...
2182095
Amatu Allah
Amatu Allah Neveen Ebrahim
.
Andreas Weiden
Duplicate the items you need on several canvases and set the property SYNCHRONIZE WITH ITEM accordingly.
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 13 2018
Added on Jul 16 2018
2 comments
111 views