[Home] [Help]
543: discount_type,
544: NVL(volume_from,0),
545: volume_to,
546: DECODE(volume_type, 'PRICING_ATTRIBUTE12', 'AMT', 'PRICING_ATTRIBUTE10', 'QTY', NULL, 'NA')
547: FROM ozf_offer_discount_lines
548: WHERE offer_discount_line_id = p_offer_discount_line_id;
549:
550:
551: l_api_name CONSTANT VARCHAR2(30) := 'populate_prod_line';
727: discount_type,
728: NVL(volume_from,0) volume_from,
729: volume_to,
730: DECODE(volume_type, 'PRICING_ATTRIBUTE12', 'AMT', 'PRICING_ATTRIBUTE10', 'QTY', NULL, 'NA') volume_type
731: FROM ozf_offer_discount_lines
732: WHERE offer_id = p_offer_id;
733:
734: l_api_name CONSTANT VARCHAR2(30) := 'populate_prod_tier';
735: l_discount NUMBER;
1134: --
1135: l_stmt := 'SELECT';
1136: l_stmt := l_stmt || ' DISTINCT FIRST_VALUE(a.discount) OVER (PARTITION BY epdhv.child_id ORDER BY c.category_level_num DESC NULLS LAST) discount, ' ;
1137: l_stmt := l_stmt || ' FIRST_VALUE(b.product_id) OVER (PARTITION BY epdhv.child_id ORDER BY c.category_level_num DESC NULLS LAST) product_id ';
1138: l_stmt := l_stmt || ' FROM ozf_offer_discount_lines a, ';
1139: l_stmt := l_stmt || ' ozf_offer_discount_products b, ';
1140: l_stmt := l_stmt || ' eni_prod_den_hrchy_parents_v c, ';
1141: l_stmt := l_stmt || ' mtl_item_categories mic, ';
1142: l_stmt := l_stmt || ' eni_prod_denorm_hrchy_v epdhv ';