How to find the suppliers data with bank details :-
Very Simple query :-
SELECT DISTINCT APS.VENDOR_ID,
ASSA.VENDOR_SITE_ID,
APS.VENDOR_NAME,
HR.NAME ORG_NAME,
APS.SEGMENT1 VENDOR_NUM,
APS.VENDOR_TYPE_LOOKUP_CODE VENDOR_TYPE,
ASSA.VENDOR_SITE_CODE VENDOR_SITE,
ASSA.ATTRIBUTE13 GST_STATUS,
ASSA.ATTRIBUTE12 GST_NO,
PAN_NO,
ASSA.ADDRESS_LINE1,
ASSA.ADDRESS_LINE2,
ASSA.ADDRESS_LINE3,
ASSA.CITY,
ASSA.STATE,
ASSA.ZIP,
ASSA.EMAIL_ADDRESS,
ASSA.PHONE PHONE_NO,
IEBA.BANK_NAME,
IEBA.BANK_ACCOUNT_NUMBER,
IEBA.BRANCH_NUMBER,
IEBA.BANK_NUMBER,
IEBA.DESCRIPTION,
IEBA.BANK_BRANCH_NAME
FROM APPS.AP_SUPPLIERS APS,
APPS.AP_SUPPLIER_SITES_ALL ASSA,
APPS.IBY_PAYEE_ASSIGNED_BANKACCT_V IPAB,
APPS.IBY_ACCOUNT_OWNERS IAO,
APPS.IBY_EXT_BANK_ACCOUNTS_V IEBA,
APPS.HR_OPERATING_UNITS HR,
APPS.JAI_AP_TDS_VENDOR_HDRS JAI
WHERE 1 = 1
AND APS.VENDOR_ID = ASSA.VENDOR_ID
AND ASSA.ORG_ID = HR.ORGANIZATION_ID
-- AND HR.SET_OF_BOOKS_ID = 2121
AND JAI.VENDOR_SITE_ID(+) = ASSA.VENDOR_SITE_ID
AND ASSA.VENDOR_SITE_ID = IPAB.SUPPLIER_SITE_ID
AND APS.PARTY_ID = ipab.party_id
AND IPAB.EXT_BANK_ACCOUNT_ID = IEBA.EXT_BANK_ACCOUNT_ID
AND APS.END_DATE_ACTIVE IS NULL
AND ASSA.INACTIVE_DATE IS NULL
AND IEBA.EXT_BANK_ACCOUNT_ID(+) = IAO.EXT_BANK_ACCOUNT_ID
AND IAO.ACCOUNT_OWNER_PARTY_ID(+) = APS.PARTY_ID
AND IAO.END_DATE IS NULL
AND IEBA.END_DATE IS NULL
AND IPAB.END_DATE IS NULL
ORDER BY 3;
Very Simple query :-
SELECT DISTINCT APS.VENDOR_ID,
ASSA.VENDOR_SITE_ID,
APS.VENDOR_NAME,
HR.NAME ORG_NAME,
APS.SEGMENT1 VENDOR_NUM,
APS.VENDOR_TYPE_LOOKUP_CODE VENDOR_TYPE,
ASSA.VENDOR_SITE_CODE VENDOR_SITE,
ASSA.ATTRIBUTE13 GST_STATUS,
ASSA.ATTRIBUTE12 GST_NO,
PAN_NO,
ASSA.ADDRESS_LINE1,
ASSA.ADDRESS_LINE2,
ASSA.ADDRESS_LINE3,
ASSA.CITY,
ASSA.STATE,
ASSA.ZIP,
ASSA.EMAIL_ADDRESS,
ASSA.PHONE PHONE_NO,
IEBA.BANK_NAME,
IEBA.BANK_ACCOUNT_NUMBER,
IEBA.BRANCH_NUMBER,
IEBA.BANK_NUMBER,
IEBA.DESCRIPTION,
IEBA.BANK_BRANCH_NAME
FROM APPS.AP_SUPPLIERS APS,
APPS.AP_SUPPLIER_SITES_ALL ASSA,
APPS.IBY_PAYEE_ASSIGNED_BANKACCT_V IPAB,
APPS.IBY_ACCOUNT_OWNERS IAO,
APPS.IBY_EXT_BANK_ACCOUNTS_V IEBA,
APPS.HR_OPERATING_UNITS HR,
APPS.JAI_AP_TDS_VENDOR_HDRS JAI
WHERE 1 = 1
AND APS.VENDOR_ID = ASSA.VENDOR_ID
AND ASSA.ORG_ID = HR.ORGANIZATION_ID
-- AND HR.SET_OF_BOOKS_ID = 2121
AND JAI.VENDOR_SITE_ID(+) = ASSA.VENDOR_SITE_ID
AND ASSA.VENDOR_SITE_ID = IPAB.SUPPLIER_SITE_ID
AND APS.PARTY_ID = ipab.party_id
AND IPAB.EXT_BANK_ACCOUNT_ID = IEBA.EXT_BANK_ACCOUNT_ID
AND APS.END_DATE_ACTIVE IS NULL
AND ASSA.INACTIVE_DATE IS NULL
AND IEBA.EXT_BANK_ACCOUNT_ID(+) = IAO.EXT_BANK_ACCOUNT_ID
AND IAO.ACCOUNT_OWNER_PARTY_ID(+) = APS.PARTY_ID
AND IAO.END_DATE IS NULL
AND IEBA.END_DATE IS NULL
AND IPAB.END_DATE IS NULL
ORDER BY 3;
No comments:
Post a Comment