SQL Script to find Contract Purchase Agreement Number R11i
I have written the following script to link ap invoices to po's and want to get the contract purchase agreement number we use in Oracle. I can get the contract_id but the contract_num from po lines is blank (yet when I log into Oracle I can see the cpa number).
My sql script is below. Can someone help me get the contract number ie G.CONTRACT_NUM in script below ?
select d.segment1 as vendor_num
,d.vendor_name as vendor
,c.invoice_num
,c.invoice_type_lookup_code as type
,c.DESCRIPTION as invoice_desc
,c.invoice_date as invoice_dt