The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT cust_account_id
INTO x_cust_account_id
FROM aso_quote_headers_all
WHERE quote_header_id = p_quote_header_id;
SELECT qh.cust_account_id, qs.ship_to_party_site_id,qs.ship_to_cust_account_id
FROM aso_quote_headers_all qh, aso_shipments qs
WHERE qh.quote_header_id = qs.quote_header_id
AND qh.quote_header_id = l_quote_header_id
AND qs.quote_line_id is NULL;
SELECT qh.cust_account_id, qs.ship_to_party_site_id,
qs.ship_to_cust_account_id,qh.quote_header_id
FROM aso_quote_headers_all qh, aso_shipments qs, aso_quote_lines_all ql
WHERE qh.quote_header_id = qs.quote_header_id
AND ql.quote_header_id = qh.quote_header_id
AND ql.quote_line_id = l_quote_line_id
AND ql.quote_line_id = qs.quote_line_id;
SELECT cust_account_id, invoice_to_party_site_id,invoice_to_cust_account_id
FROM aso_quote_headers_all
WHERE quote_header_id = l_quote_header_id;
SELECT qh.cust_account_id, ql.invoice_to_party_site_id,
ql.invoice_to_cust_account_id, qh.quote_header_id
FROM aso_quote_headers_all qh, aso_quote_lines_all ql
WHERE ql.quote_line_id = l_quote_line_id
AND ql.quote_header_id = qh.quote_header_id;
SELECT qs.ship_to_party_site_id
FROM aso_shipments qs
WHERE qs.quote_header_id = l_quote_header_id
AND qs.quote_line_id is NULL;
SELECT qs.ship_to_party_site_id
FROM aso_shipments qs
WHERE qs.quote_line_id = l_quote_line_id;
SELECT qs.invoice_to_party_site_id
FROM aso_quote_headers_all qs
WHERE qs.quote_header_id = l_quote_header_id;
SELECT qs.invoice_to_party_site_id
FROM aso_quote_lines_all qs
WHERE qs.quote_line_id = l_quote_line_id;
SELECT party_id
INTO x_party_id
FROM aso_quote_headers_all
WHERE quote_header_id = p_quote_header_id;
SELECT customer_class_code
INTO x_class_code
FROM hz_cust_accounts
WHERE cust_account_id = p_cust_account_id;
SELECT profile_class_id
FROM HZ_CUSTOMER_PROFILES
WHERE cust_account_id = p_cust_account_id;
SELECT sales_channel_code
INTO x_sales_channel_code
FROM hz_cust_accounts
WHERE cust_account_id = p_cust_account_id;
SELECT gsa_indicator_flag
INTO x_gsa
FROM hz_cust_accounts accts ,hz_parties party
WHERE accts.party_id=party.party_id
AND cust_account_id = p_cust_account_id;
SELECT site_use_id
INTO x_site_use_id
FROM HZ_CUST_SITE_USES_ALL
WHERE contact_id = p_contact_id;
SELECT SUM(nvl(quantity,0))
INTO l_quote_qty
FROM aso_quote_lines_all
WHERE quote_header_id=p_qte_header_id
AND (line_category_code<>'RETURN' OR line_category_code IS NULL)
GROUP BY quote_header_id;
SELECT SUM((nvl(quantity,0))*(LINE_LIST_PRICE-LINE_ADJUSTED_AMOUNT))
INTO l_quote_amount
FROM aso_quote_lines_all
WHERE quote_header_id=p_qte_header_id
AND (line_category_code<>'RETURN' OR line_category_code IS NULL)
GROUP BY quote_header_id;
SELECT shippable_item_flag
INTO x_shippable_item_flag
FROM aso_i_items_v i, aso_quote_lines_all l
WHERE l.quote_line_id = p_qte_line_id
and l.inventory_item_id = i.inventory_item_id
and l.organization_id = i.organization_id;
Cursor get_po is SELECT payment_ref_number from aso_payments
WHERE
payment_type_code ='PO' and quote_header_id = p_qte_header_id and quote_line_id is NULL;
Cursor get_po is SELECT payment_ref_number from aso_payments
WHERE
payment_type_code ='PO' and quote_line_id = p_qte_line_id;
Cursor get_req_date is SELECT request_date from aso_shipments
WHERE
quote_header_id = p_qte_header_id and quote_line_id is NULL;
Cursor get_req_date is SELECT request_date from aso_shipments
WHERE quote_line_id = p_qte_line_id ;
Cursor get_frieght is SELECT FREIGHT_TERMS_CODE from aso_shipments
WHERE
quote_header_id = p_qte_header_id and quote_line_id is NULL;
Cursor get_frieght is SELECT FREIGHT_TERMS_CODE from aso_shipments
WHERE
quote_line_id = p_qte_line_id;
Cursor get_pmnt_term is SELECT payment_term_id from aso_payments
WHERE
quote_header_id = p_qte_header_id and quote_line_id IS null;
Cursor get_hdr_pmnt_term is SELECT payment_term_id from aso_payments
WHERE
quote_header_id = p_qte_header_id and quote_line_id IS null;
Cursor get_pmnt_term is SELECT payment_term_id from aso_payments
WHERE
quote_line_id = p_qte_line_id;
SELECT qs.freight_terms_code
FROM aso_shipments qs
WHERE qs.quote_line_id = p_qte_line_id
and qs.freight_terms_code is not null;
SELECT qs.freight_terms_code
FROM aso_shipments qs, aso_quote_lines_all ql
WHERE qs.quote_header_id = ql.quote_header_id
and ql.quote_line_id = p_qte_line_id
and qs.quote_line_id IS NULL;
SELECT qs.ship_method_code
FROM aso_shipments qs
WHERE qs.quote_line_id = p_qte_line_id
and qs.ship_method_code is not null;
SELECT qs.ship_method_code
FROM aso_shipments qs, aso_quote_lines_all ql
WHERE qs.quote_header_id = ql.quote_header_id
and ql.quote_line_id = p_qte_line_id
and qs.quote_line_id IS NULL;
select quote_line_id
from aso_line_relationships aso_rel
where aso_rel.related_quote_line_id = l_quote_line_id;
select inventory_item_id
from aso_quote_lines_all
where quote_line_id = x_top_model_line_id;
SELECT 'x'
FROM aso_quote_lines_all l
WHERE l.quote_header_id = p_qte_header_id
AND EXISTS ( SELECT null
FROM mtl_system_items_b i
WHERE l.inventory_item_id = i.inventory_item_id
AND l.organization_id = i.organization_id
AND i.shippable_item_flag = 'Y' );
SELECT SERVICE_REF_TYPE_CODE,service_ref_line_id
FROM aso_quote_line_details qld
WHERE qld.quote_line_id = l_quote_line_id ;
select line_list_price
INTO x_list_price
from aso_quote_lines_all ql
where ql.quote_line_id = l_service_ref_line_id;
select unit_list_price
INTO x_list_price
from oe_order_lines_All
where line_id = l_service_ref_line_id;