The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT party_id
FROM HZ_CUST_ACCOUNTS
WHERE cust_account_id = acct_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 = pty_id;
SELECT object_id
FROM HZ_RELATIONSHIPS
WHERE party_id = pty_id
AND object_type = 'ORGANIZATION'
AND object_table_name = 'HZ_PARTIES';
IF (p_application_type_code = 'QUOTING HTML' AND p_operation_code = 'UPDATE') THEN
l_qte_header_rec := ASO_UTILITY_PVT.query_header_row (p_qte_rec.quote_header_id);
IF P_Header_Shipment_Tbl(1).operation_code = 'UPDATE' AND
(P_Header_Shipment_Tbl(1).shipment_id IS NOT NULL AND P_Header_Shipment_Tbl(1).shipment_id <> FND_API.G_MISS_NUM) THEN
IF P_Header_Shipment_Tbl(1).ship_to_party_id <> FND_API.G_MISS_NUM OR
P_Header_Shipment_Tbl(1).ship_to_cust_party_id <> FND_API.G_MISS_NUM OR
P_Header_Shipment_Tbl(1).ship_to_cust_account_id <> FND_API.G_MISS_NUM OR
P_Header_Shipment_Tbl(1).ship_to_party_site_id <> FND_API.G_MISS_NUM THEN
l_shipment_rec := ASO_UTILITY_PVT.query_shipment_row (P_Header_Shipment_Tbl(1).shipment_id);
END IF; -- UPDATE
select cust_acct_site_id from hz_cust_site_uses
where site_use_id = l_site_use_id;
SELECT party_site_use_id
FROM hz_party_site_uses
WHERE party_site_id = l_sold_to_party_site
AND site_use_type = 'SOLD_TO';
SELECT invoice_to_cust_account_id
FROM aso_quote_headers_all
WHERE Quote_header_id = P_Qte_Rec.quote_header_id;
select cust_acct_site_id from hz_cust_site_uses
where site_use_id = l_site_use_id;
SELECT cust_account_id, cust_party_id
FROM ASO_QUOTE_HEADERS_ALL
WHERE quote_header_id = qte_hdr;
SELECT party_id
FROM HZ_CUST_ACCOUNTS
WHERE cust_account_id = acct_id
AND status = 'A'
AND sysdate BETWEEN NVL(account_activation_date, sysdate) AND NVL(account_termination_date, sysdate);
SELECT invoice_to_cust_account_id,end_customer_cust_account_id
FROM ASO_QUOTE_LINES_ALL
WHERE quote_line_id = P_Qte_Line_Rec.quote_line_id;
SELECT ship_to_cust_account_id
FROM ASO_SHIPMENTS
WHERE shipment_id = l_shipment_id;
IF (P_Qte_Line_Rec.operation_code = 'UPDATE' AND P_Application_Type_Code = 'QUOTING HTML') THEN
l_qte_line_rec := ASO_UTILITY_PVT.query_qte_line_row (P_Qte_Line_Rec.quote_line_id);
IF P_line_Shipment_Tbl(j).operation_code = 'UPDATE' THEN
IF P_line_Shipment_Tbl(j).shipment_id IS NOT NULL AND P_line_Shipment_Tbl(j).shipment_id <> FND_API.G_MISS_NUM THEN
IF P_line_Shipment_Tbl(j).ship_to_party_id <> FND_API.G_MISS_NUM OR
P_line_Shipment_Tbl(j).ship_to_cust_party_id <> FND_API.G_MISS_NUM OR
P_line_Shipment_Tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM OR
P_line_Shipment_Tbl(j).ship_to_party_site_id <> FND_API.G_MISS_NUM THEN
l_shipment_rec := ASO_UTILITY_PVT.query_shipment_row (P_line_Shipment_Tbl(j).shipment_id);
END IF; -- UPDATE
SELECT count(rowid)
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 count(a.rowid)
from hz_cust_accounts a, hz_relationships b
where a.party_id = b.object_id
and a.status = 'A'
AND sysdate BETWEEN NVL(a.account_activation_date, sysdate) AND NVL(a.account_termination_date, sysdate)
and b.party_id = l_party_id
and b.subject_table_name = 'HZ_PARTIES'
and b.subject_type = 'PERSON';
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)
ORDER BY creation_date ASC;
select party_type
from hz_parties
where party_id = l_party_id;
select object_id
from hz_relationships
where party_id = l_party_id
and object_table_name = 'HZ_PARTIES'
and subject_table_name = 'HZ_PARTIES'
and subject_type = 'PERSON';
select a.cust_account_id
from hz_cust_accounts a, hz_relationships b
where a.party_id = b.object_id
and a.status = 'A'
AND sysdate BETWEEN NVL(a.account_activation_date, sysdate) AND NVL(a.account_termination_date, sysdate)
and b.party_id = l_party_id
and b.subject_table_name = 'HZ_PARTIES'
and b.subject_type = 'PERSON'
ORDER BY a.creation_date ASC;
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 cust_acct_site_id, status
from
hz_cust_acct_sites
where
cust_account_id = p_cust_account_id
and party_site_id = p_party_site_id
and status = 'A';
select cust_acct_site_id, status
from
hz_cust_acct_sites
where
cust_account_id = p_cust_account_id
and party_site_id = p_party_site_id
and status <> 'A';
select site_use_id, status
from
hz_cust_site_uses
where
cust_acct_site_id = l_acct_site_id
and site_use_code = l_site_type
and status = 'A';
select site_use_id, status
from
hz_cust_site_uses
where
cust_acct_site_id = l_acct_site_id
and site_use_code = l_site_type
and status <> 'A';
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 = cust_acct
and b.party_site_id = party_site
and a.cust_acct_site_id = b.cust_acct_site_id
and a.site_use_code = 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;
l_last_update_date DATE;
SELECT bill_to_flag, ship_to_flag, last_update_date
FROM hz_cust_acct_relate
WHERE cust_account_id = p_related_cust_account
AND related_cust_account_id = p_sold_to_cust_account;
INTO l_bill_to_flag, l_ship_to_flag, l_last_update_date;
SELECT 'X'
FROM aso_quote_headers_all
WHERE quote_header_id = qte_hdr;
SELECT a.cust_account_id, a.invoice_to_cust_account_id, a.cust_party_id,
a.invoice_to_cust_party_id, a.party_id, a.sold_to_party_site_id,
a.invoice_to_party_id, a.invoice_to_party_site_id,
a.End_Customer_party_id, a.End_Customer_party_site_id,
a.End_Customer_cust_party_id, a.End_Customer_cust_account_id,
b.ship_to_party_id, b.ship_to_party_site_id,
b.ship_to_cust_party_id, b.ship_to_cust_account_id,
b.shipment_id
FROM aso_quote_headers_all a, aso_shipments b
WHERE a.quote_header_id = qte_hdr
AND a.quote_header_id = b.quote_header_id
AND b.quote_line_id is NULL;
SELECT a.invoice_to_cust_account_id, a.invoice_to_cust_party_id, a.quote_line_id,
a.invoice_to_party_id, a.invoice_to_party_site_id,
a.End_Customer_cust_account_id, a.End_Customer_cust_party_id,
a.End_Customer_party_id, a.End_Customer_party_site_id,
b.ship_to_cust_account_id, b.ship_to_cust_party_id, b.shipment_id,
b.ship_to_party_id, b.ship_to_party_site_id
FROM aso_quote_lines_all a, aso_shipments b
WHERE a.quote_header_id = qte_hdr
AND a.quote_line_id = b.quote_line_id
AND ((a.invoice_to_cust_account_id IS NULL
AND a.invoice_to_cust_party_id IS NOT NULL)
OR (a.End_Customer_cust_account_id is NULL
AND a.End_Customer_cust_party_id IS NOT NULL)
OR (b.ship_to_cust_account_id is NULL
AND b.ship_to_cust_party_id IS NOT NULL));
l_last_update_date date := SYSDATE;
UPDATE ASO_QUOTE_HEADERS_ALL
SET cust_account_id = l_account_id
,last_update_date = l_last_update_date
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE quote_header_id = p_qte_header_id;
UPDATE ASO_QUOTE_HEADERS_ALL
SET invoice_to_cust_account_id = l_account_id
,last_update_date = l_last_update_date
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE quote_header_id = p_qte_header_id;
UPDATE ASO_QUOTE_HEADERS_ALL
SET end_customer_cust_account_id = l_account_id
,last_update_date = l_last_update_date
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE quote_header_id = p_qte_header_id;
UPDATE ASO_SHIPMENTS
SET ship_to_cust_account_id = l_account_id
,last_update_date = l_last_update_date
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE shipment_id = l_header_shipment_tbl(1).shipment_id;
UPDATE ASO_QUOTE_LINES_ALL
SET invoice_to_cust_account_id = l_account_id
,last_update_date = l_last_update_date
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE quote_line_id = l_qte_line_rec.quote_line_id;
UPDATE ASO_QUOTE_LINES_ALL
SET End_Customer_cust_account_id = l_account_id
,last_update_date = l_last_update_date
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE quote_line_id = l_qte_line_rec.quote_line_id;
UPDATE ASO_SHIPMENTS
SET ship_to_cust_account_id = l_account_id
,last_update_date = l_last_update_date
,last_updated_by = l_g_user_id
,last_update_login = l_g_login_id
WHERE shipment_id = Line_Acct.shipment_id;
SELECT party_id
FROM HZ_CUST_ACCOUNTS
WHERE cust_account_id = acct_id
AND status = 'A'
AND sysdate BETWEEN NVL(account_activation_date, sysdate) AND NVL(account_termination_date, sysdate);
SELECT 'X'
FROM aso_quote_headers_all
WHERE quote_header_id = qte_hdr;
SELECT cust_party_id
FROM aso_quote_headers_all
WHERE quote_header_id = qte_hdr
AND (cust_account_id IS NULL
AND cust_party_id IS NOT NULL);
SELECT invoice_to_cust_party_id
FROM aso_quote_headers_all
WHERE quote_header_id = qte_hdr
AND (invoice_to_cust_account_id IS NULL
AND invoice_to_cust_party_id IS NOT NULL);
SELECT End_Customer_cust_party_id
FROM aso_quote_headers_all
WHERE quote_header_id = qte_hdr
AND (End_Customer_cust_account_id IS NULL
AND End_Customer_cust_party_id IS NOT NULL);
SELECT invoice_to_cust_party_id
FROM aso_quote_lines_all
WHERE quote_header_id = qte_hdr
AND invoice_to_cust_account_id IS NULL
AND invoice_to_cust_party_id IS NOT NULL;
SELECT End_Customer_cust_party_id
FROM aso_quote_lines_all
WHERE quote_header_id = qte_hdr
AND End_Customer_cust_account_id IS NULL
AND End_Customer_cust_party_id IS NOT NULL;
SELECT ship_to_cust_party_id
FROM aso_shipments
WHERE quote_header_id = qte_hdr
AND ship_to_cust_account_id IS NULL
AND ship_to_cust_party_id IS NOT NULL;
SELECT cust_account_id
FROM hz_cust_accounts
WHERE party_id = pty_id
AND status = 'A'
AND sysdate BETWEEN NVL(account_activation_date, sysdate) AND NVL(account_termination_date, sysdate);