267: where interest_type_id = c_interest_type_id;
268:
269: CURSOR C_Get_Product_Cat_Id2(c_interest_code_id NUMBER) IS
270: select product_category_id, product_cat_set_id
271: from AS_INTEREST_CODES_B
272: where interest_code_id = c_interest_code_id;
273:
274: BEGIN
275:
599: -- Update primary interest code
600: update as_lead_lines_all l
601: set (product_category_id, product_cat_set_id) =
602: (select int.product_category_id, int.product_cat_set_id
603: from as_interest_codes_b int
604: where l.primary_interest_code_id = int.interest_code_id)
605: where l.lead_line_id >= l_count
606: and l.lead_line_id < l_count+G_BATCH_SIZE
607: and l.primary_interest_code_id is not null
610: -- Update secondary interest code
611: update as_lead_lines_all l
612: set (product_category_id, product_cat_set_id) =
613: (select int.product_category_id, int.product_cat_set_id
614: from as_interest_codes_b int
615: where l.secondary_interest_code_id = int.interest_code_id)
616: where l.lead_line_id >= l_count
617: and l.lead_line_id < l_count+G_BATCH_SIZE
618: and l.secondary_interest_code_id is not null;
834: -- Update primary interest code
835: update as_interests_all l
836: set (product_category_id, product_cat_set_id) =
837: (select int.product_category_id, int.product_cat_set_id
838: from as_interest_codes_b int
839: where l.primary_interest_code_id = int.interest_code_id)
840: where l.interest_id >= l_count
841: and l.interest_id < l_count+G_BATCH_SIZE
842: and l.primary_interest_code_id is not null
845: -- Update secondary interest code
846: update as_interests_all l
847: set (product_category_id, product_cat_set_id) =
848: (select int.product_category_id, int.product_cat_set_id
849: from as_interest_codes_b int
850: where l.secondary_interest_code_id = int.interest_code_id)
851: where l.interest_id >= l_count
852: and l.interest_id < l_count+G_BATCH_SIZE
853: and l.secondary_interest_code_id is not null;
960: -- Update primary interest code
961: update as_lead_lines_log l
962: set (product_category_id, product_cat_set_id) =
963: (select int.product_category_id, int.product_cat_set_id
964: from as_interest_codes_b int
965: where l.primary_interest_code_id = int.interest_code_id)
966: where l.log_id >= l_count
967: and l.log_id < l_count+G_BATCH_SIZE
968: and l.primary_interest_code_id is not null
971: -- Update secondary interest code
972: update as_lead_lines_log l
973: set (product_category_id, product_cat_set_id) =
974: (select int.product_category_id, int.product_cat_set_id
975: from as_interest_codes_b int
976: where l.secondary_interest_code_id = int.interest_code_id)
977: where l.log_id >= l_count
978: and l.log_id < l_count+G_BATCH_SIZE
979: and l.secondary_interest_code_id is not null;
1086: -- Update primary interest code
1087: update as_sales_credits_denorm l
1088: set (product_category_id, product_cat_set_id) =
1089: (select int.product_category_id, int.product_cat_set_id
1090: from as_interest_codes_b int
1091: where l.primary_interest_code_id = int.interest_code_id)
1092: where l.sales_credit_id >= l_count
1093: and l.sales_credit_id < l_count+G_BATCH_SIZE
1094: and nvl(l.primary_interest_code_id,-1) <> -1
1097: -- Update secondary interest code
1098: update as_sales_credits_denorm l
1099: set (product_category_id, product_cat_set_id) =
1100: (select int.product_category_id, int.product_cat_set_id
1101: from as_interest_codes_b int
1102: where l.secondary_interest_code_id = int.interest_code_id)
1103: where l.sales_credit_id >= l_count
1104: and l.sales_credit_id < l_count+G_BATCH_SIZE
1105: and nvl(l.secondary_interest_code_id,-1) <> -1;
1275: -- Update primary interest code
1276: update as_pe_int_categories l
1277: set (product_category_id, product_cat_set_id) =
1278: (select int.product_category_id, int.product_cat_set_id
1279: from as_interest_codes_b int
1280: where l.pri_interest_code_id = int.interest_code_id)
1281: where nvl(l.pri_interest_code_id,-1) <> -1
1282: and nvl(l.sec_interest_code_id,-1) = -1;
1283:
1284: -- Update secondary interest code
1285: update as_pe_int_categories l
1286: set (product_category_id, product_cat_set_id) =
1287: (select int.product_category_id, int.product_cat_set_id
1288: from as_interest_codes_b int
1289: where l.sec_interest_code_id = int.interest_code_id)
1290: where nvl(l.sec_interest_code_id,-1) <> -1;
1291:
1292: -- commit after each batch