100% found this document useful (1 vote)
503 views2 pages

All Istore Queries

The document contains 4 SQL queries. The first query gets the customer name, price list, account number associated with a user. The second query gets the customer name and registry id. The third query finds iStore users. The fourth query is the same as the first query but with a specific user name filter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
503 views2 pages

All Istore Queries

The document contains 4 SQL queries. The first query gets the customer name, price list, account number associated with a user. The second query gets the customer name and registry id. The third query finds iStore users. The fourth query is the same as the first query but with a specific user name filter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Query to get the customer name, price list, account number associated to a user?

select distinct(HZR.Object_id) "Customer Id" , HZP.party_name "Customer Name",


HZC.account_number "Account Number", HZC.PRICE_LIST_ID "Price List Id" , QPTL.name
"Price list name"
from fnd_user FUSR , HZ_PARTIES HZP,
HZ_RELATIONSHIPS HZR , HZ_CUST_ACCOUNTS HZC ,
QP_LIST_HEADERS_TL QPTL
where FUSR.person_party_id = HZR.subject_id
and HZP.party_id = HZR.object_id
AND HZC.PARTY_ID = HZR.object_id
and QPTL.list_header_id = HZC.PRICE_LIST_ID
and FUSR.user_name like '<User Name>'

---------------------------------------------------------------------------------

Query to get the customer name and the corresponding registry id?

SELECT party_number AS
"Registry Id",
party_name AS
"Customer Name" ,
HZC.Account_number as "Account Number"
FROM hz_parties HZ , hz_cust_accounts_all HZC
WHERE party_type LIKE 'ORGANIZATION'
and HZC.party_id(+) = HZ.party_id

---------------------------------------------------------------------------------

Query to find iStore Users

SELECT a.user_name
,a.description
,a.email_address
,b.responsibility_name
FROM FND_USER a
,fnd_responsibility_tl b
,FND_USER_RESP_GROUPS_DIRECT c
WHERE 1=1
AND a.user_id=c.user_id
AND b.responsibility_id=c.responsibility_id
and b.responsibility_name like 'CTT AUK iStore User'
AND a.end_date IS NULL
AND c.end_date IS NULL
ORDER BY a.user_name

-----------------------------------------------------------------------------------
-
query gives the associated customer name, account number, the price list name for a
given user name

select distinct(HZR.Object_id) "Customer Id" , HZP.party_name "Customer Name",


HZC.account_number "Account Number", HZC.PRICE_LIST_ID "Price List Id" , QPTL.name
"Price list name"
from fnd_user FUSR , HZ_PARTIES HZP,
HZ_RELATIONSHIPS HZR , HZ_CUST_ACCOUNTS HZC ,
QP_LIST_HEADERS_TL QPTL
where FUSR.person_party_id = HZR.subject_id
and HZP.party_id = HZR.object_id
AND HZC.PARTY_ID = HZR.object_id
and QPTL.list_header_id = HZC.PRICE_LIST_ID
and FUSR.user_name like 'IX306-1'

-----------------------------------------------------------------------------------
----

You might also like