0% found this document useful (0 votes)
10 views

SQL Query 22

22

Uploaded by

Amit
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

SQL Query 22

22

Uploaded by

Amit
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SET VARIABLE PREFERRED_CURRENCY='User Preferred Currency 1';

SELECT
q.s_1 AS "Distribution Combination",
q.s_2 AS "GL Account",
q.s_3 AS "Invoice Header Amount Paid",
q.s_4 AS "Invoice Header Invoice Amount",
q.s_5 AS "Invoice Date",
q.s_6 AS "Invoice Type",
q.s_7 AS "Invoice",
p.d_3 AS "Invoice_ID",
p.d_1 AS "Invoice Amount QAR",
q.s_9 AS "Paid Status",
q.s_10 AS "Receipt Date",
q.s_11 AS "Receipt Number",
q.s_12 AS "Budget Date",
q.s_13 AS "Order",
q.s_14 AS "Supplier Number",
q.s_15 AS "Supplier Site",
q.s_16 AS "Supplier"
FROM
(SELECT
"Procurement - Procure To Pay Real Time"."- Distribution
Combination"."Concatenated Segments" s_1,
"Procurement - Procure To Pay Real Time"."GL Account"."Concatenated
Segments" s_2,
"Procurement - Procure To Pay Real Time"."Invoice Additional
Attributes"."Invoice Header Amount Paid" s_3,
"Procurement - Procure To Pay Real Time"."Invoice Additional
Attributes"."Invoice Header Invoice Amount" s_4,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice Date" s_5,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice Type" s_6,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice" s_7,
"Procurement - Procure To Pay Real Time"."Invoice"."Paid Status" s_9,
"Procurement - Procure To Pay Real Time"."Invoice"."Receipt Date" s_10,
"Procurement - Procure To Pay Real Time"."Invoice"."Receipt Number" s_11,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Budget Date"
s_12,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Order" s_13,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Supplier Number"
s_14,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Supplier Site"
s_15,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Supplier" s_16,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice ID" s_17
FROM "Procurement - Procure To Pay Real Time") q,
(SELECT
"Payables Invoices - Transactions Real Time"."- Invoice Amounts"."Base
Amount" d_1,
"Payables Invoices - Transactions Real Time"."- General Information"."Invoice
Number" d_2,
"Payables Invoices - Transactions Real Time"."- General
Information"."Invoice ID" d_3
FROM "Payables Invoices - Transactions Real Time" ) p
Where q.s_17 = p.d_3

FROM
(SELECT
"Procurement - Procure To Pay Real Time"."- Distribution
Combination"."Concatenated Segments" s_1,
"Procurement - Procure To Pay Real Time"."GL Account"."Concatenated
Segments" s_2,
"Procurement - Procure To Pay Real Time"."Invoice Additional
Attributes"."Invoice Header Amount Paid" s_3,
"Procurement - Procure To Pay Real Time"."Invoice Additional
Attributes"."Invoice Header Invoice Amount" s_4,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice Date" s_5,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice Type" s_6,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice" s_7,
"Procurement - Procure To Pay Real Time"."Invoice"."Paid Status" s_9,
"Procurement - Procure To Pay Real Time"."Invoice"."Receipt Date" s_10,
"Procurement - Procure To Pay Real Time"."Invoice"."Receipt Number" s_11,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Budget Date"
s_12,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Order" s_13,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Supplier Number"
s_14,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Supplier Site"
s_15,
"Procurement - Procure To Pay Real Time"."Purchase Order"."Supplier" s_16,
"Procurement - Procure To Pay Real Time"."Invoice"."Invoice ID" s_17
FROM "Procurement - Procure To Pay Real Time") q,
(SELECT
"Payables Invoices - Transactions Real Time"."- Invoice Amounts"."Base
Amount" d_1,
"Payables Invoices - Transactions Real Time"."- General Information"."Invoice
Number" d_2,
"Payables Invoices - Transactions Real Time"."- General
Information"."Invoice ID" d_3
FROM "Payables Invoices - Transactions Real Time" ) p
Where q.s_17 = p.d_6

=====================

You might also like