SELECT * FROM HZ_PARTIES
WHERE PARTY_NAME LIKE 'DEENA VISION%';
SELECT * FROM HZ_CUST_ACCOUNTS_ALL
WHERE PARTY_ID =94043 ;
SELECT * FROM HZ_CUST_ACCT_SITES_ALL
WHERE CUST_ACCOUNT_ID =62040;
SELECT * FROM HZ_CUST_SITE_USES_ALL
WHERE CUST_ACCT_SITE_ID = 62041;
==============================================================================
select * from jtf_rs_salesreps
where SALESREP_ID =100004040 ;
SELECT SALESREP_ID,A.RESOURCE_NAME,B.ORG_ID
FROM JTF_RS_RESOURCE_EXTNS_TL A,
jtf_rs_salesreps B
WHERE 1=1
--AND SALESREP_ID =100004040
AND A.RESOURCE_ID = B.RESOURCE_ID
AND A.RESOURCE_NAME LIKE 'D SENTHIL%';
==================================================
SELECT HCSUA.CUST_ACCT_SITE_ID,HCSUA.ORG_ID,AC.CUSTOMER_ID,AC.CUSTOMER_NAME,CUSTOMER_NUMBER,HCSUA.PRIMARY_SALESREP_ID,
(SELECT A.RESOURCE_NAME FROM JTF_RS_RESOURCE_EXTNS_TL A,
jtf_rs_salesreps B
WHERE SALESREP_ID =HCSUA.PRIMARY_SALESREP_ID --100004040
AND A.RESOURCE_ID = B.RESOURCE_ID) SALESREP_NAME
FROM AR_CUSTOMERS AC,
HZ_CUST_ACCOUNTS_ALL HCAA,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSUA
WHERE AC.CUSTOMER_ID = HCAA.CUST_ACCOUNT_ID
AND HCAA.CUST_ACCOUNT_ID = HCASA.CUST_ACCOUNT_ID
AND HCASA.CUST_ACCT_SITE_ID = HCSUA.CUST_ACCT_SITE_ID
AND AC.CUSTOMER_NUMBER = 'RDD1078';
UPDATE THE TABLE:-
UPDATE HZ_CUST_SITE_USES_ALL
SET PRIMARY_SALESREP_ID = 100018070
WHERE ORG_ID = 182
AND CUST_ACCT_SITE_ID= 62041;
commit;
WHERE PARTY_NAME LIKE 'DEENA VISION%';
SELECT * FROM HZ_CUST_ACCOUNTS_ALL
WHERE PARTY_ID =94043 ;
SELECT * FROM HZ_CUST_ACCT_SITES_ALL
WHERE CUST_ACCOUNT_ID =62040;
SELECT * FROM HZ_CUST_SITE_USES_ALL
WHERE CUST_ACCT_SITE_ID = 62041;
==============================================================================
select * from jtf_rs_salesreps
where SALESREP_ID =100004040 ;
SELECT SALESREP_ID,A.RESOURCE_NAME,B.ORG_ID
FROM JTF_RS_RESOURCE_EXTNS_TL A,
jtf_rs_salesreps B
WHERE 1=1
--AND SALESREP_ID =100004040
AND A.RESOURCE_ID = B.RESOURCE_ID
AND A.RESOURCE_NAME LIKE 'D SENTHIL%';
==================================================
SELECT HCSUA.CUST_ACCT_SITE_ID,HCSUA.ORG_ID,AC.CUSTOMER_ID,AC.CUSTOMER_NAME,CUSTOMER_NUMBER,HCSUA.PRIMARY_SALESREP_ID,
(SELECT A.RESOURCE_NAME FROM JTF_RS_RESOURCE_EXTNS_TL A,
jtf_rs_salesreps B
WHERE SALESREP_ID =HCSUA.PRIMARY_SALESREP_ID --100004040
AND A.RESOURCE_ID = B.RESOURCE_ID) SALESREP_NAME
FROM AR_CUSTOMERS AC,
HZ_CUST_ACCOUNTS_ALL HCAA,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSUA
WHERE AC.CUSTOMER_ID = HCAA.CUST_ACCOUNT_ID
AND HCAA.CUST_ACCOUNT_ID = HCASA.CUST_ACCOUNT_ID
AND HCASA.CUST_ACCT_SITE_ID = HCSUA.CUST_ACCT_SITE_ID
AND AC.CUSTOMER_NUMBER = 'RDD1078';
UPDATE THE TABLE:-
UPDATE HZ_CUST_SITE_USES_ALL
SET PRIMARY_SALESREP_ID = 100018070
WHERE ORG_ID = 182
AND CUST_ACCT_SITE_ID= 62041;
commit;