Tuesday, 25 October 2011

OPEN_PO_TAX_DTLS_QRY

sELECT   (SELECT   poh.segment1
            FROM   po_headers_all poh
           WHERE   poh.po_header_id = po.po_header_id)
            "PO NO",
         (SELECT   LINE_NUM
            FROM   po_lines_All
           WHERE   PO_LINE_ID = po.PO_LINE_ID)
            "Line No",
     tax.TAX_NAME,
         po.TAX_TYPE,
         tax.TAX_RATE,
         po.TAX_AMOUNT
  FROM   JA_IN_PO_LINE_LOCATION_TAXES po, JA_IN_TAX_CODES tax
 WHERE   po.TAX_ID = tax.TAX_ID
         AND po.PO_HEADER_ID IN (272618, 274687, 275004, 285765)
         order by po.PO_HEADER_ID

sELECT   (SELECT   poh.segment1
            FROM   po_headers_all poh
           WHERE   poh.po_header_id = po.po_header_id)
            "PO NO",
         (SELECT   LINE_NUM
            FROM   po_lines_All
           WHERE   PO_LINE_ID = po.PO_LINE_ID)
            Line_No,
         tax.TAX_NAME,
         po.TAX_TYPE,
         tax.TAX_RATE,
         po.TAX_AMOUNT
  FROM   JA_IN_PO_LINE_LOCATION_TAXES po, JA_IN_TAX_CODES tax
 WHERE   po.TAX_ID = tax.TAX_ID
         AND po.PO_HEADER_ID IN (155050,163369,173100,193758,247641)
         order by po.PO_HEADER_ID
        
        
sELECT   (SELECT   poh.segment1
            FROM   po_headers_all poh
           WHERE   poh.po_header_id = po.po_header_id)
            "PO NO",
         (SELECT   LINE_NUM
            FROM   po_lines_All
           WHERE   PO_LINE_ID = po.PO_LINE_ID)
            Line_No,
         tax.TAX_NAME,
         po.TAX_TYPE,
         tax.TAX_RATE,
         po.TAX_AMOUNT
  FROM   JA_IN_PO_LINE_LOCATION_TAXES po, JA_IN_TAX_CODES tax
 WHERE   po.TAX_ID = tax.TAX_ID
         AND po.PO_HEADER_ID IN
         (263661,266317,266354,267277,269224,269319,269320,270552,273381,273536,280116,282246,
282576,282577,290615,291394,296359,296360,296770,297580,298025)
         order by po.PO_HEADER_ID
        

sELECT   (SELECT   poh.segment1
            FROM   po_headers_all poh
           WHERE   poh.po_header_id = po.po_header_id)
            "PO NO",
         (SELECT   LINE_NUM
            FROM   po_lines_All
           WHERE   PO_LINE_ID = po.PO_LINE_ID)
            Line_No,
         tax.TAX_NAME,
         po.TAX_TYPE,
         tax.TAX_RATE,
         po.TAX_AMOUNT
  FROM   JA_IN_PO_LINE_LOCATION_TAXES po, JA_IN_TAX_CODES tax
 WHERE   po.TAX_ID = tax.TAX_ID
         AND po.PO_HEADER_ID IN
         (
         290046,321422,321423,321828,322652,323710,324547,325963,327577,328512,332321,332405,333966,334350,334481,334565,
334902,335664,337180,337301,338082,338110,338529,338646,338998,338999,339393,339394,339729,340731,341150,341173,341198)
         order by po.PO_HEADER_ID

No comments:

Post a Comment