178: CURSOR c_sales_lead_line_int IS
179: SELECT to_char(lead.interest_type_id) code
180: FROM as_sales_lead_lines lead
181: WHERE lead.interest_type_id not in (SELECT int.interest_type_id
182: FROM as_interest_types_b int)
183: UNION
184: SELECT lead.interest_type_id||'/'||lead.primary_interest_code_id code
185: FROM as_sales_lead_lines lead
186: WHERE lead.primary_interest_code_id not in (SELECT pic.interest_code_id
365: -- Update interest type
366: update as_sales_lead_lines l
367: set (category_id, category_set_id) =
368: (select int.product_category_id, int.product_cat_set_id
369: from as_interest_types_b int
370: where l.interest_type_id = int.interest_type_id)
371: where l.sales_lead_line_id >= l_count
372: and l.sales_lead_line_id < l_count+G_BATCH_SIZE
373: and l.interest_type_id is not null