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!

using subquery in pivot

the pastApr 12 2021

hi I am so tired with pivot
tried to do query without any result

SELECT *
FROM (select v.vendor_name,
ql.item_description,
      v.vendor_id,
       ql.total_price,
       
       MITEMS.best_price 
FROM _HEADERS qh ,Qutation_LINES ql, po_vendors v ,_PO_BESTPRICE_ITEMS MITEMS
where qh.qutation_id = ql.qutation_id and v.vendor_id = qh.vendor_id and MITEMS.item_id = ql.item_id and  qh.po_header_id = 99755
     ) 
PIVOT 
   (
    COUNT(*) as detp_employees_cnt FOR 
    vendor_id IN(SELECT distinct vendor_id 
      FROM PO_RFQ_VENDORS where po_header_id=99755)
   );

not working unless i insert satitic values in pivot

please support me in that

Comments
Post Details
Added on Apr 12 2021
16 comments
1,840 views