Sunday, March 29, 2020

Print Flag Details of Customer statement Query

select cust_acct.account_number customer_number,
party_site.party_site_number site_number,
hp.PARTY_NAME, RCTA.TRX_DATE,rcta.trx_number,
RCT.name, PRINTING_ORIGINAL_DATE,PRINTING_LAST_PRINTED
FROM APPS.ra_customer_trx_all rcta,
APPS.hz_cust_accounts cust_acct,
APPS.hz_party_sites party_site,
APPS.hz_cust_acct_sites_all acct_site,
APPS.hz_cust_site_uses_all site_uses,
APPS.hz_parties hp,
APPS.ra_cust_trx_types_all rct
where  rcta.ship_to_customer_id = cust_acct.cust_account_id
AND rcta.ship_to_customer_id = acct_site.cust_account_id
AND rcta.ship_to_site_use_id = site_uses.site_use_id
AND cust_acct.cust_account_id = acct_site.cust_account_id
AND acct_site.cust_acct_site_id = site_uses.cust_acct_site_id
AND site_uses.site_use_code = 'SHIP_TO'
AND party_site.party_site_id = acct_site.party_site_id
AND hp.party_id = cust_acct.party_id
AND hp.party_id = party_site.party_id
AND rct.CUST_TRX_TYPE_ID = rcta.CUST_TRX_TYPE_ID
--AND rcta.CUST_TRX_TYPE_ID = 1225
and rcta.trx_number in ('170169','170170');

No comments:

Post a Comment