[Home] [Help]
992: FROM wms_selection_criteria_txn wsc,
993: wms_strategies_b wsb,
994: wms_strategy_members wsm,
995: wms_rules_b wrb,
996: wms_restrictions r,
997: wms_sort_criteria s,
998: wms_rule_consistencies c,
999: wms_parameters_b p
1000: WHERE wsc.rule_type_code = 2
1747: l_parent_parameter_type_code wms_parameters_b.parameter_type_code%TYPE;
1748: l_parent_column_name wms_parameters_b.column_name%TYPE;
1749: l_parent_expression wms_parameters_b.expression%TYPE;
1750: l_parent_data_type_code wms_parameters_b.data_type_code%TYPE;
1751: l_operand_type_code wms_restrictions.operand_type_code%TYPE;
1752: l_operand_constant_number wms_restrictions.operand_constant_number%TYPE;
1753: l_operand_constant_character wms_restrictions.operand_constant_character%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1748: l_parent_column_name wms_parameters_b.column_name%TYPE;
1749: l_parent_expression wms_parameters_b.expression%TYPE;
1750: l_parent_data_type_code wms_parameters_b.data_type_code%TYPE;
1751: l_operand_type_code wms_restrictions.operand_type_code%TYPE;
1752: l_operand_constant_number wms_restrictions.operand_constant_number%TYPE;
1753: l_operand_constant_character wms_restrictions.operand_constant_character%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1756: l_operand_flex_value_set_id wms_restrictions.operand_flex_value_set_id%TYPE;
1749: l_parent_expression wms_parameters_b.expression%TYPE;
1750: l_parent_data_type_code wms_parameters_b.data_type_code%TYPE;
1751: l_operand_type_code wms_restrictions.operand_type_code%TYPE;
1752: l_operand_constant_number wms_restrictions.operand_constant_number%TYPE;
1753: l_operand_constant_character wms_restrictions.operand_constant_character%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1756: l_operand_flex_value_set_id wms_restrictions.operand_flex_value_set_id%TYPE;
1757: l_bracket_open wms_restrictions.bracket_open%TYPE;
1750: l_parent_data_type_code wms_parameters_b.data_type_code%TYPE;
1751: l_operand_type_code wms_restrictions.operand_type_code%TYPE;
1752: l_operand_constant_number wms_restrictions.operand_constant_number%TYPE;
1753: l_operand_constant_character wms_restrictions.operand_constant_character%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1756: l_operand_flex_value_set_id wms_restrictions.operand_flex_value_set_id%TYPE;
1757: l_bracket_open wms_restrictions.bracket_open%TYPE;
1758: l_bracket_close wms_restrictions.bracket_close%TYPE;
1751: l_operand_type_code wms_restrictions.operand_type_code%TYPE;
1752: l_operand_constant_number wms_restrictions.operand_constant_number%TYPE;
1753: l_operand_constant_character wms_restrictions.operand_constant_character%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1756: l_operand_flex_value_set_id wms_restrictions.operand_flex_value_set_id%TYPE;
1757: l_bracket_open wms_restrictions.bracket_open%TYPE;
1758: l_bracket_close wms_restrictions.bracket_close%TYPE;
1759: l_validation_type fnd_flex_value_sets.validation_type%TYPE;
1752: l_operand_constant_number wms_restrictions.operand_constant_number%TYPE;
1753: l_operand_constant_character wms_restrictions.operand_constant_character%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1756: l_operand_flex_value_set_id wms_restrictions.operand_flex_value_set_id%TYPE;
1757: l_bracket_open wms_restrictions.bracket_open%TYPE;
1758: l_bracket_close wms_restrictions.bracket_close%TYPE;
1759: l_validation_type fnd_flex_value_sets.validation_type%TYPE;
1760: l_id_column_name fnd_flex_validation_tables.id_column_name%TYPE;
1753: l_operand_constant_character wms_restrictions.operand_constant_character%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1756: l_operand_flex_value_set_id wms_restrictions.operand_flex_value_set_id%TYPE;
1757: l_bracket_open wms_restrictions.bracket_open%TYPE;
1758: l_bracket_close wms_restrictions.bracket_close%TYPE;
1759: l_validation_type fnd_flex_value_sets.validation_type%TYPE;
1760: l_id_column_name fnd_flex_validation_tables.id_column_name%TYPE;
1761: l_value_column_name fnd_flex_validation_tables.value_column_name%TYPE;
1754: l_operand_constant_date wms_restrictions.operand_constant_date%TYPE;
1755: l_operand_expression wms_restrictions.operand_expression%TYPE;
1756: l_operand_flex_value_set_id wms_restrictions.operand_flex_value_set_id%TYPE;
1757: l_bracket_open wms_restrictions.bracket_open%TYPE;
1758: l_bracket_close wms_restrictions.bracket_close%TYPE;
1759: l_validation_type fnd_flex_value_sets.validation_type%TYPE;
1760: l_id_column_name fnd_flex_validation_tables.id_column_name%TYPE;
1761: l_value_column_name fnd_flex_validation_tables.value_column_name%TYPE;
1762: l_application_table_name fnd_flex_validation_tables.application_table_name%TYPE;
1798: FROM wms_sort_criteria wsc
1799: WHERE wsc.rule_id = p_rule_id
1800: UNION
1801: SELECT wr.parameter_id
1802: FROM wms_restrictions wr
1803: WHERE wr.rule_id = p_rule_id
1804: UNION
1805: SELECT wr.operand_parameter_id
1806: FROM wms_restrictions wr
1802: FROM wms_restrictions wr
1803: WHERE wr.rule_id = p_rule_id
1804: UNION
1805: SELECT wr.operand_parameter_id
1806: FROM wms_restrictions wr
1807: WHERE wr.rule_id = p_rule_id
1808: AND wr.operand_type_code = 4
1809: UNION
1810: SELECT wrc.parameter_id
1832: FROM wms_sort_criteria wscd
1833: WHERE wscd.rule_id = p_rule_id
1834: UNION
1835: SELECT wrd.parameter_id
1836: FROM wms_restrictions wrd
1837: WHERE wrd.rule_id = p_rule_id
1838: UNION
1839: SELECT wrd.operand_parameter_id
1840: FROM wms_restrictions wrd
1836: FROM wms_restrictions wrd
1837: WHERE wrd.rule_id = p_rule_id
1838: UNION
1839: SELECT wrd.operand_parameter_id
1840: FROM wms_restrictions wrd
1841: WHERE wrd.rule_id = p_rule_id
1842: AND wrd.operand_type_code = 4
1843: UNION
1844: SELECT wrcd.parameter_id
1863: FROM wms_sort_criteria wsc
1864: WHERE wsc.rule_id = p_rule_id
1865: UNION
1866: SELECT wr.parameter_id
1867: FROM wms_restrictions wr
1868: WHERE wr.rule_id = p_rule_id
1869: UNION
1870: SELECT wr.operand_parameter_id
1871: FROM wms_restrictions wr
1867: FROM wms_restrictions wr
1868: WHERE wr.rule_id = p_rule_id
1869: UNION
1870: SELECT wr.operand_parameter_id
1871: FROM wms_restrictions wr
1872: WHERE wr.rule_id = p_rule_id
1873: AND wr.operand_type_code = 4
1874: UNION
1875: SELECT wrc.parameter_id
1901: FROM wms_sort_criteria wsc
1902: WHERE wsc.rule_id = p_rule_id
1903: UNION
1904: SELECT wr.parameter_id
1905: FROM wms_restrictions wr
1906: WHERE wr.rule_id = p_rule_id
1907: UNION
1908: SELECT wr.operand_parameter_id
1909: FROM wms_restrictions wr
1905: FROM wms_restrictions wr
1906: WHERE wr.rule_id = p_rule_id
1907: UNION
1908: SELECT wr.operand_parameter_id
1909: FROM wms_restrictions wr
1910: WHERE wr.rule_id = p_rule_id
1911: AND wr.operand_type_code = 4
1912: UNION
1913: SELECT wrc.parameter_id
2014: , wms_db_objects wdor
2015: , wms_parameters_b wpbr
2016: , wms_db_objects wdol
2017: , wms_parameters_b wpbl
2018: , wms_restrictions wr
2019: WHERE wr.rule_id = p_rule_id
2020: AND wpbl.parameter_id = wr.parameter_id
2021: AND wdol.db_object_id(+) = wpbl.db_object_id
2022: AND wpbr.parameter_id(+) = wr.operand_parameter_id
14557: UPDATE wms_rules_b
14558: SET rule_weight = (SELECT 100 * COUNT(parameter_id)
14559: FROM (SELECT DISTINCT rules.rule_id
14560: , par.parameter_id
14561: FROM wms_rules_b rules, wms_restrictions rest, wms_parameters_b par
14562: WHERE rules.rule_id = p_rule_id
14563: AND rules.rule_id = rest.rule_id(+)
14564: AND rest.parameter_id = par.parameter_id(+)
14565: AND (NVL(par.use_for_tt_assn_flag, 'Y') = 'Y'