Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 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