SELECT *
FROM jtf_rs_resource_extns rsc,
jtf_rs_salesreps srp,
hz_cust_accounts cust_acct,
hz_parties party
WHERE cust_acct.party_id = party.party_id
AND rsc.resource_id = srp.resource_id
AND cust_acct.primary_salesrep_id = srp.salesrep_id
select RSE.RESOURCE_NUMBER,
RSE.RESOURCE_NAME,
RSE.START_DATE_ACTIVE,
RSE.END_DATE_ACTIVE,
RSA.ORG_ID
FROM APPS.JTF_RS_RESOURCE_EXTNS_VL RSE,
APPS.RA_SALESREPS_ALL RSA
WHERE RSA.ORG_ID IN (400,420)
AND RSA.RESOURCE_ID=RSE.RESOURCE_ID