The following lines contain the word 'select', 'insert', 'update' or 'delete':
select QUALIFIER_CONTEXT, QUALIFIER_ATTRIBUTE
into v_qualifier_context, v_qualifier_attribute
from QP_QUALIFIERS
where LIST_LINE_ID = p_list_line_id
and ( (QUALIFIER_CONTEXT = l_order_type_context
and QUALIFIER_ATTRIBUTE = l_order_type_attribute)
or (QUALIFIER_CONTEXT = l_customer_po_context
and QUALIFIER_ATTRIBUTE = l_customer_po_attribute)
or (QUALIFIER_CONTEXT = l_agreement_type_context
and QUALIFIER_ATTRIBUTE = l_agreement_type_attribute)
or (QUALIFIER_CONTEXT = l_agreement_name_context
and QUALIFIER_ATTRIBUTE = l_agreement_name_attribute));
select PRODUCT_ATTRIBUTE_CONTEXT, PRODUCT_ATTRIBUTE
into v_product_attribute_context, v_product_attribute
from QP_PRICING_ATTRIBUTES
where LIST_LINE_ID = p_list_line_id
and ( (PRODUCT_ATTRIBUTE_CONTEXT = l_item_no_context
and PRODUCT_ATTRIBUTE = l_item_no_attribute)
or (PRODUCT_ATTRIBUTE_CONTEXT = l_item_category_context
and PRODUCT_ATTRIBUTE = l_item_category_attribute));
select QUALIFIER_ATTR_VALUE
into v_qualifier_attr_value
from QP_QUALIFIERS
where LIST_LINE_ID = p_list_line_id
and ( (QUALIFIER_CONTEXT = l_order_type_context
and QUALIFIER_ATTRIBUTE = l_order_type_attribute)
or (QUALIFIER_CONTEXT = l_customer_po_context
and QUALIFIER_ATTRIBUTE = l_customer_po_attribute)
or (QUALIFIER_CONTEXT = l_agreement_type_context
and QUALIFIER_ATTRIBUTE = l_agreement_type_attribute)
or (QUALIFIER_CONTEXT = l_agreement_name_context
and QUALIFIER_ATTRIBUTE = l_agreement_name_attribute));
select PRODUCT_ATTR_VALUE
into v_product_attr_value
from QP_PRICING_ATTRIBUTES
where LIST_LINE_ID = p_list_line_id
and ( (PRODUCT_ATTRIBUTE_CONTEXT = l_item_no_context
and PRODUCT_ATTRIBUTE = l_item_no_attribute)
or (PRODUCT_ATTRIBUTE_CONTEXT = l_item_category_context
and PRODUCT_ATTRIBUTE = l_item_category_attribute));
select PRODUCT_ATTR_VALUE
into v_product_attr_value
from QP_PRICING_ATTRIBUTES
where LIST_LINE_ID = p_list_line_id
and ( (PRODUCT_ATTRIBUTE_CONTEXT = l_item_no_context
and PRODUCT_ATTRIBUTE = l_item_no_attribute)
or (PRODUCT_ATTRIBUTE_CONTEXT = l_item_category_context
and PRODUCT_ATTRIBUTE = l_item_category_attribute));
select 'X' into v_pricing_attr_value_to from qp_pricing_attributes
where list_line_id = p_list_line_id and pricing_attr_value_to is not null;
select MIN(qpa.LIST_LINE_ID)
into x_return
from QP_PRICING_ATTRIBUTES qpa
where ATTRIBUTE_GROUPING_NO in ( select qpb.ATTRIBUTE_GROUPING_NO
from QP_PRICING_ATTRIBUTES qpb
where qpb.LIST_LINE_ID = p_list_line_id) ;