2014-01-06
头信息:
po : po_headers_all.segment1
rev : po_headers_all.revision_num
supplier :
SELECT v.vendor_name
FROM po_headers_all poh,
po_vendors v
where v.vendor_id(+) = poh.vendor_id
and poh.segment1 = 'FCJT1109220015';
ship-to :
SELECT hrl1.location_code
FROM po_headers_all poh,
hr_locations_all_tl hrl1
WHERE hrl1.location_id(+) = poh.ship_to_location_id
AND hrl1.language(+) = userenv('LANG')
AND poh.segment1 = 'FCJT1109220015';
buyer :
SELECT p.full_name
FROM po_headers_all poh,
per_people_f p
WHERE poh.agent_id = p.person_id
AND trunc(SYSDATE) BETWEEN p.effective_start_date AND p.effective_end_date
AND p.employee_number IS NOT NULL
AND poh.segment1 = 'FCJT1109220015';
description : po_headers_all.comments
type :
SELECT pdt.type_name
FROM po_headers_all poh,
po_document_types_all pdt
WHERE ((pdt.document_type_code IN ('PO',
'PA') AND pdt.document_subtype = poh.type_lookup_code))
AND poh.org_id = pdt.org_id
AND poh.segment1 = 'FCJT1109220015';
site :
SELECT vs.vendor_site_code
FROM po_headers_all poh,
po_vendor_sites_all vs
WHERE vs.vendor_site_id(+) = poh.vendor_site_id
AND poh.segment1 = 'FCJT1109220015';
bill-to :
SELECT hrl2.location_code
FROM po_headers_all poh,
hr_locations_all_tl hrl2
WHERE hrl2.location_id(+) = poh.bill_to_location_id
AND hrl2.language(+) = userenv('LANG')
AND poh.segment1 = 'FCJT1109220015';
status : --
created : po_headers_all.creation_date
contact :
SELECT decode(poh.vendor_contact_id,
NULL,
NULL,
vc.last_name || ', ' || vc.first_name)
FROM po_headers_all poh,
po_vendor_contacts vc
WHERE vc.vendor_contact_id(+) = poh.vendor_contact_id
AND poh.segment1 = 'FCJT1109220015';
currency : po_headers_all.currency_code
total : --
行信息:
line tab :
num : po_lines_all.line_num