/* Formatted on 16-08-2011 20:20:28 (QP5 v5.115.810.9015) */
SELECT DISTINCT
hr.organization_id, --pv.org_id,
UPPER (HR.NAME) OPERATING_UNIT,
UPPER (A.VENDOR_NAME) VENDOR_NAME,
A.VENDOR_NUMBER,
UPPER (A.VENDOR_NAME_ALT) ALTERNATE_NAME,
NULL Alias,
UPPER (a.VENDOR_TYPE_DISP) VENDOR_TYPE,
UPPER (A.WOMEN_OWNED_FLAG) WOMEN_OWNED,
UPPER (A.SMALL_BUSINESS_FLAG) SMALL_BUSINESS,
DECODE (A.MATCH_OPTION, 'P', 'Purchase Order', 'R', 'Receipt', NULL)
INVOICE_MATCH_OPTION,
UPPER (A.INVOICE_CURRENCY_CODE) INVOICE_CURRENCY,
UPPER (a.VAT_REGISTRATION_NUM) TAX_REGISTRATION_NUMBER,
UPPER (A.RECEIVING_ROUTING_NAME) RECEIPT_ROUTING,
DECODE (A.INVOICE_MATCHING_FLAG,
'NN', '2-Way',
'NY', '3-Way',
'YY', '4-Way',
NULL)
MATCH_APPROVAL_LEVEL,
UPPER (A.ONE_TIME_FLAG) ONE_TIME_FLAG,
UPPER (A.CREATE_DEBIT_MEMO_FLAG) CREATE_DEBIT_MEMO_RTV,
A.ATTRIBUTE1,
DECODE (A.PAYMENT_METHOD_LOOKUP_CODE,
'CHECK', 'Check',
'CLEARING', 'Clearing',
'EFT', 'Electronic',
'WIRE', 'Wire',
NULL)
PAYMENT_METHOD,
UPPER (C.NAME) PAYMENT_TERMS,
DECODE (A.PAY_DATE_BASIS_LOOKUP_CODE,
'DISCOUNT', 'Discount',
'DUE', 'Due',
NULL)
PAY_DATE_BASIS_LOOKUP_CODE,
UPPER (A.PAYMENT_PRIORITY) PAYMENT_PRIORITY,
UPPER (A.PAY_GROUP_LOOKUP_CODE) PAY_GROUP_LOOKUP_CODE,
UPPER (A.INVOICE_CURRENCY_CODE) INVOICE_CURRENCY_CODE,
UPPER (A.PAYMENT_CURRENCY_CODE) PAYMENT_CURRENCY_CODE,
DECODE (A.TERMS_DATE_BASIS,
'Current', 'System',
'Goods Received', 'Goods Received',
'Invoice', 'Invoice',
'Invoice Received', 'Invoice Received',
NULL)
TERMS_DATE_BASIS,
UPPER (A.ORGANIZATION_TYPE_LOOKUP_CODE)
ORGANIZATION_TYPE_LOOKUP_CODE,
UPPER (A.INSPECTION_REQUIRED_FLAG) INSPECTION_REQUIRED_FLAG,
UPPER (A.RECEIPT_REQUIRED_FLAG) RECEIPT_REQUIRED_FLAG,
A.QTY_RCV_TOLERANCE,
DECODE (A.QTY_RCV_EXCEPTION_CODE,
'NONE', 'None',
'REJECT', 'Reject',
'WARNING', 'Warning',
NULL)
QTY_RCV_EXCEPTION_CODE,
UPPER (A.DAYS_EARLY_RECEIPT_ALLOWED) DAYS_EARLY_RECEIPT_ALLOWED,
UPPER (A.DAYS_LATE_RECEIPT_ALLOWED) DAYS_LATE_RECEIPT_ALLOWED,
A.vendor_id old_Ref_Vendor_id --,
-- a.vendor_id Old_Reference,
--pv.org_id
FROM apps.AP_VENDORS_V A,
apps.AP_TERMS C,
apps.po_vendor_sites_all pv,
apps.hr_operating_units hr
WHERE A.TERMS_ID = C.TERM_ID(+)
AND a.END_DATE_ACTIVE IS NULL
AND a.vendor_id = pv.vendor_id
AND hr.SET_OF_BOOKS_ID = 5
--AND pv.org_id IN (1280, 1202, 1203, 1204, 1205)
AND hr.organization_id = pv.org_id
AND a.vendor_id IN (15685, 18484, 51547, 64242, 66436, 69531)
Select * from po_vendors where vendor_name in (Select distinct vendor_name from xx_vendor_name1)
Select * from AP_VENDORS_V where vendor_name like '%NISHA%SHARMA'
--and a.VENDOR_TYPE_DISP not in ('Employee','EMPLOYEE', 'Ex-Employee','EX-EMPLOYEE','EMPLOYEERM')
--and A.VENDOR_NUMBER in (Select distinct vendor_code from xx_vendor_code1)
Select DISTINCT VENDOR_TYPE_LOOKUP_CODE from po_vendors
Select organization_id,name from hr_operating_units where set_of_books_id=5
SELECT DISTINCT
hr.organization_id, --pv.org_id,
UPPER (HR.NAME) OPERATING_UNIT,
UPPER (A.VENDOR_NAME) VENDOR_NAME,
A.VENDOR_NUMBER,
UPPER (A.VENDOR_NAME_ALT) ALTERNATE_NAME,
NULL Alias,
UPPER (a.VENDOR_TYPE_DISP) VENDOR_TYPE,
UPPER (A.WOMEN_OWNED_FLAG) WOMEN_OWNED,
UPPER (A.SMALL_BUSINESS_FLAG) SMALL_BUSINESS,
DECODE (A.MATCH_OPTION, 'P', 'Purchase Order', 'R', 'Receipt', NULL)
INVOICE_MATCH_OPTION,
UPPER (A.INVOICE_CURRENCY_CODE) INVOICE_CURRENCY,
UPPER (a.VAT_REGISTRATION_NUM) TAX_REGISTRATION_NUMBER,
UPPER (A.RECEIVING_ROUTING_NAME) RECEIPT_ROUTING,
DECODE (A.INVOICE_MATCHING_FLAG,
'NN', '2-Way',
'NY', '3-Way',
'YY', '4-Way',
NULL)
MATCH_APPROVAL_LEVEL,
UPPER (A.ONE_TIME_FLAG) ONE_TIME_FLAG,
UPPER (A.CREATE_DEBIT_MEMO_FLAG) CREATE_DEBIT_MEMO_RTV,
A.ATTRIBUTE1,
DECODE (A.PAYMENT_METHOD_LOOKUP_CODE,
'CHECK', 'Check',
'CLEARING', 'Clearing',
'EFT', 'Electronic',
'WIRE', 'Wire',
NULL)
PAYMENT_METHOD,
UPPER (C.NAME) PAYMENT_TERMS,
DECODE (A.PAY_DATE_BASIS_LOOKUP_CODE,
'DISCOUNT', 'Discount',
'DUE', 'Due',
NULL)
PAY_DATE_BASIS_LOOKUP_CODE,
UPPER (A.PAYMENT_PRIORITY) PAYMENT_PRIORITY,
UPPER (A.PAY_GROUP_LOOKUP_CODE) PAY_GROUP_LOOKUP_CODE,
UPPER (A.INVOICE_CURRENCY_CODE) INVOICE_CURRENCY_CODE,
UPPER (A.PAYMENT_CURRENCY_CODE) PAYMENT_CURRENCY_CODE,
DECODE (A.TERMS_DATE_BASIS,
'Current', 'System',
'Goods Received', 'Goods Received',
'Invoice', 'Invoice',
'Invoice Received', 'Invoice Received',
NULL)
TERMS_DATE_BASIS,
UPPER (A.ORGANIZATION_TYPE_LOOKUP_CODE)
ORGANIZATION_TYPE_LOOKUP_CODE,
UPPER (A.INSPECTION_REQUIRED_FLAG) INSPECTION_REQUIRED_FLAG,
UPPER (A.RECEIPT_REQUIRED_FLAG) RECEIPT_REQUIRED_FLAG,
A.QTY_RCV_TOLERANCE,
DECODE (A.QTY_RCV_EXCEPTION_CODE,
'NONE', 'None',
'REJECT', 'Reject',
'WARNING', 'Warning',
NULL)
QTY_RCV_EXCEPTION_CODE,
UPPER (A.DAYS_EARLY_RECEIPT_ALLOWED) DAYS_EARLY_RECEIPT_ALLOWED,
UPPER (A.DAYS_LATE_RECEIPT_ALLOWED) DAYS_LATE_RECEIPT_ALLOWED,
A.vendor_id old_Ref_Vendor_id --,
-- a.vendor_id Old_Reference,
--pv.org_id
FROM apps.AP_VENDORS_V A,
apps.AP_TERMS C,
apps.po_vendor_sites_all pv,
apps.hr_operating_units hr
WHERE A.TERMS_ID = C.TERM_ID(+)
AND a.END_DATE_ACTIVE IS NULL
AND a.vendor_id = pv.vendor_id
AND hr.SET_OF_BOOKS_ID = 5
--AND pv.org_id IN (1280, 1202, 1203, 1204, 1205)
AND hr.organization_id = pv.org_id
AND a.vendor_id IN (15685, 18484, 51547, 64242, 66436, 69531)
Select * from po_vendors where vendor_name in (Select distinct vendor_name from xx_vendor_name1)
Select * from AP_VENDORS_V where vendor_name like '%NISHA%SHARMA'
--and a.VENDOR_TYPE_DISP not in ('Employee','EMPLOYEE', 'Ex-Employee','EX-EMPLOYEE','EMPLOYEERM')
--and A.VENDOR_NUMBER in (Select distinct vendor_code from xx_vendor_code1)
Select DISTINCT VENDOR_TYPE_LOOKUP_CODE from po_vendors
Select organization_id,name from hr_operating_units where set_of_books_id=5
No comments:
Post a Comment