The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT currency_code
FROM gl_sets_of_books
WHERE set_of_books_id = X_set_of_books_id;
SELECT order_source_id
FROM OE_ORDER_SOURCES
WHERE name = quote_source_code;
select sold_to_org_id from oe_order_headers_v
where header_id = order_id;
select cust_acct_site_id from hz_cust_site_uses
where site_use_id = l_site_use_id;
SELECT quote_number, quote_version
FROM aso_quote_headers_all
WHERE quote_header_id = l_qte_hdr_id ;
SELECT nvl(scheduling_level_code,' ')
FROM OE_TRANSACTION_TYPES_ALL
WHERE transaction_type_id = p_type_id;
select salesrep_id
/* from jtf_rs_srp_vl */ --Commented Code Yogeshwar (MOAC)
from jtf_rs_salesreps_mo_v --New Code Yogeshwar (MOAC)
where resource_id = p_resource_id ;
SELECT Salesrep_Id
FROM JTF_RS_SALESREPS_MO_V
WHERE Salesrep_Number = lc_srep_num
AND NVL(status,'A') = 'A'
AND nvl(trunc(start_date_active), trunc(sysdate)) <= trunc(sysdate)
AND nvl(trunc(end_date_active), trunc(sysdate)) >= trunc(sysdate) ;
SELECT TAX_EXEMPT_REASON_CODE
FROM aso_tax_details
WHERE quote_header_id = l_header_id
AND quote_line_id IS NULL;
-- update in quote tables if needed
IF upper(p_qte_rec.quote_source_code) = 'ORDER CAPTURE QUOTES' THEN
UPDATE ASO_QUOTE_HEADERS_ALL
SET Exchange_Type_Code = l_conversion_type,
Exchange_Rate_Date = l_sysdate,
Exchange_rate = p_qte_rec.exchange_rate
,last_update_date = l_sysdate
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE Quote_header_Id = p_qte_rec.quote_header_id;
END IF; -- update quote
UPDATE ASO_QUOTE_HEADERS_ALL
SET cust_account_id = l_cust_account_id
,last_update_date = l_sysdate
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE Quote_header_Id = p_qte_rec.quote_header_id;
END IF; -- update quote
IF p_operation = 'UPDATE' THEN
IF aso_debug_pub.g_debug_flag = 'Y' THEN
aso_debug_pub.add('before query = ' || p_qte_rec.order_id , 1, 'Y');
ELSIF p_operation = 'UPDATE' THEN
l_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
p_operation = 'UPDATE' THEN
l_header_rec.salesrep_id := FND_API.G_MISS_NUM;
END IF; -- p_operation = UPDATE;
ELSIF p_operation = 'UPDATE' THEN
l_header_rec.orig_sys_document_ref := p_qte_rec.original_system_reference;
aso_debug_pub.add('p_operation = UPDATE ** l_header_rec.orig_sys_document_ref: '||l_header_rec.orig_sys_document_ref,1,'N');
ELSIF p_operation = 'UPDATE' THEN
l_quote_source := FND_API.G_MISS_CHAR;
ELSIF p_operation = 'UPDATE' THEN
l_header_payment_tbl(pay_count).operation := p_header_payment_tbl(i).operation_code;
ELSIF p_line_shipment_tbl(j).operation_code = 'DELETE' THEN
l_line_tbl(i).operation := OE_GLOBALS.G_OPR_DELETE;
ELSIF p_qte_line_tbl(k).operation_code = 'UPDATE' THEN
l_line_tbl(i).operation := OE_GLOBALS.G_OPR_UPDATE;
SELECT party_type
from
hz_parties
where party_id = p_party_id
and status = 'A';
select a.org_contact_id
from
hz_org_contacts a, hz_relationships b
where b.party_id = p_party_id
and a.party_relationship_id = b.relationship_id
and b.STATUS = 'A' AND trunc(b.START_DATE) <= trunc(sysdate)
AND trunc(nvl(b.END_DATE, sysdate)) >= trunc(sysdate);
SELECT a.party_type, a.party_id
from
HZ_PARTIES a, HZ_PARTY_SITES b
where
a.status = 'A'
AND b.status = 'A'
and b.party_site_id = p_party_site_id
and b.party_id = a.party_id;
select a.site_use_id, b.status,a.status
from
hz_cust_site_uses a, hz_cust_acct_sites b
where
b.cust_account_id = p_cust_account_id
and b.party_site_id = p_party_site_id
and a.cust_acct_site_id = b.cust_acct_site_id
and a.site_use_code = p_acct_site_type;
select a.object_id
from
hz_relationships a, hz_cust_accounts b
where a.party_id = l_party_id
and a.object_id = b.party_id
and b.cust_account_id = p_cust_account_id
and a.status = 'A'
and (sysdate between nvl(a.start_date, sysdate)
and nvl(a.end_date, sysdate))
AND b.status = 'A'
AND (sysdate BETWEEN NVL(b.account_activation_date, sysdate) AND
NVL(b.account_termination_date, sysdate));
SELECT party_type
from
HZ_PARTIES
where party_id = p_party_id and status ='A';
SELECT party_id
from hz_cust_accounts
where cust_account_id = p_cust_account_id
AND status = 'A'
AND (sysdate BETWEEN NVL(account_activation_date, sysdate) AND
NVL(account_termination_date, sysdate));
SELECT b.party_id
from hz_org_contacts a, hz_relationships b, hz_cust_accounts c
where
--a.status = 'A' and -- status column obseleted
a.party_relationship_id = b.relationship_id
and b.subject_id = p_party_id
and b.object_id = c.party_id
and c.cust_account_id = p_cust_account_id
AND c.status = 'A'
and b.status = 'A'
and (sysdate between nvl(b.start_date, sysdate) and nvl(b.end_date, sysdate))
AND (sysdate BETWEEN NVL(c.account_activation_date, sysdate) AND
NVL(c.account_termination_date, sysdate));
select a.org_contact_id
from
hz_org_contacts a, hz_relationships b
where
b.party_id = p_party_id
/* and a.status = 'A' vtariker: Status for hz_org_contacts is now obsolete */
and b.relationship_id = a.party_relationship_id
and b.status = 'A'
and (sysdate between nvl(b.start_date, sysdate) and nvl(b.end_date, sysdate));
select a.cust_account_role_id, a.status
from
hz_cust_account_roles a, hz_cust_acct_sites c
--,hz_role_responsibility d
where
a.role_type = 'CONTACT'
and a.party_id = l_party_id
and a.cust_account_id = p_cust_account_id
and a.cust_acct_site_id = c.cust_acct_site_id
and a.cust_account_id = c.cust_account_id
and c.party_site_id = p_party_site_id
--and a.cust_account_role_id = d.cust_account_role_id
--and d.responsibility_type = p_acct_site_type
and c.status = 'A'
and a.status = 'A';
select 'Y'
from
hz_cust_account_roles a, hz_cust_acct_sites c
where
a.role_type = 'CONTACT'
and a.party_id = l_party_id
and a.cust_account_id = p_cust_account_id
and a.cust_acct_site_id = c.cust_acct_site_id
and a.cust_account_id = c.cust_account_id
and c.party_site_id = p_party_site_id
and c.status = 'A';
SELECT cust_account_id
FROM hz_cust_accounts
WHERE party_id = l_Party_Id
and status = 'A'
AND (sysdate BETWEEN NVL(account_activation_date, sysdate) AND
NVL(account_termination_date, sysdate));
select party_type
from hz_parties
where party_id = p_party_id
AND status = 'A';
select a.cust_account_id
from hz_cust_accounts a, hz_cust_account_roles b
where a.cust_account_id = b.cust_account_id
and b.party_id = p_party_id
and b.role_type = 'ACCOUNT_USER'
AND b.status = 'A'
AND a.status = 'A'
AND (sysdate BETWEEN NVL(a.account_activation_date, sysdate) AND
NVL(a.account_termination_date, sysdate));
SELECT cust_account_role_id, status
FROM hz_cust_account_roles
WHERE party_id = p_party_id
AND cust_account_id = p_cust_account_id
AND role_type ='CONTACT'
AND cust_acct_site_id is null
and status = 'A';
SELECT cust_account_role_id, status
FROM hz_cust_account_roles
WHERE party_id = p_party_id
AND cust_account_id = p_cust_account_id
AND role_type ='CONTACT'
AND cust_acct_site_id is null
and status <> 'A';
SELECT par.party_id
FROM hz_relationships par,
hz_org_contacts org ,
hz_cust_accounts acc
WHERE org.party_relationship_id = par.relationship_id
AND org.org_contact_id = p_org_contact_id
-- AND org.status = 'A' -- status column obseleted
and par.status = 'A'
and (sysdate between nvl(par.start_date, sysdate) and nvl(par.end_date, sysdate))
AND acc.cust_account_id = p_cust_account_id
AND par.object_id = acc.party_id
AND acc.status = 'A'
AND (sysdate BETWEEN NVL(acc.account_activation_date, sysdate) AND
NVL(acc.account_termination_date, sysdate));
l_header_adj_tbl(adj_count).updated_flag
:= p_header_price_adj_tbl(i).updated_flag;
l_header_adj_tbl(adj_count).update_allowed
:= p_header_price_adj_tbl(i).update_allowed;
select salesrep_id
/* from jtf_rs_srp_vl */ --Commented Code Yogeshwar (MOAC)
from jtf_rs_salesreps_mo_v --New Code Yogeshwar (MOAC)
where resource_id = p_resource_id ;
ELSIF p_operation = OE_GLOBALS.G_OPR_UPDATE THEN
l_line_price_att_tbl(p_att_count).header_id
:= p_line_price_attributes_tbl(l).quote_header_id;
ELSIF p_operation = OE_GLOBALS.G_OPR_DELETE THEN
l_line_price_att_tbl(p_att_count).order_price_attrib_id
:= p_line_price_attributes_tbl(l).price_attribute_id;
l_line_adj_tbl(adj_count).updated_flag := p_line_price_adj_tbl(pad_count).updated_flag;
l_line_adj_tbl(adj_count).update_allowed := p_line_price_adj_tbl(pad_count).update_allowed;
l_line_adj_tbl(adj_count).updated_flag := p_line_price_adj_tbl(pad_count).updated_flag;
l_line_adj_tbl(adj_count).updated_flag := p_line_price_adj_tbl(pad_count).updated_flag;
ELSIF l_Line_Adj_Assoc_tbl(adj_rlt_count).operation = OE_GLOBALS.G_OPR_UPDATE THEN
l_Line_Adj_Assoc_tbl(adj_rlt_count).line_id
:= P_Line_Price_Adj_rltship_Tbl(l).QUOTE_LINE_ID;
select salesrep_id
-- from jtf_rs_srp_vl Commented Code Yogeshwar (MOAC)
from jtf_rs_salesreps_mo_v --New Code Yogeshwar (MOAC)
where resource_id = p_resource_id ;
l_lot_serial_tbl(lot_srl_count).last_updated_by
:= P_lot_serial_tbl(l).last_updated_by ;
l_lot_serial_tbl(lot_srl_count).last_update_date
:= P_lot_serial_tbl(l).last_update_date;
l_lot_serial_tbl(lot_srl_count).last_update_login
:= P_lot_serial_tbl(l).last_update_login;