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!

SQL Question on PIVOT() function

user5530072Oct 15 2013 — edited Oct 15 2013

Hello everyone,

  I have the below dataset and I would like to display it in the format that I've highlighted below:Please suggest.

ELEMENT_NAMEVALUE
PO Number4500018345
Invoice Total Amount95000.00
Invoice Number77777
Supplier NameABC
Invoice Date20130610
PO Line Number70
Line Total Amount50000.00
PO Line Number80
Line Total Amount45000.00
PO Number4500018376
Invoice Total Amount60000.00
Invoice NumberPurchRev1
Supplier NameCDF
Invoice Date20130820
PO Line Number10
Line Total Amount60000.00

Required format:

Invoice NumberPO NumberInvoice Total AmountSupplier NameInvoice DatePO Line NumberLine Total Amount
77777450001834595000.00ABC201306107050000.00
77777450001834595000.00ABC201306108045000.00
PurchRev1450001837660000.00CDF201308201060000.00
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2013
Added on Oct 15 2013
2 comments
234 views