321: CURSOR c_get_cat
322: IS
323: SELECT activity_product_id,category_set_id
324: ,category_id, act_product_used_by_id, arc_act_product_used_by
325: FROM ams_act_products act
326: WHERE level_type_code = 'FAMILY'
327: and category_id is not null
328: and category_set_id is not null
329: and category_set_id not in (select distinct category_set_id
371: FETCH c_get_map_cat INTO l_cat_rec;
372:
373: IF c_get_map_cat%FOUND
374: THEN
375: UPDATE ams_act_products
376: SET category_id = l_cat_rec.cat_id
377: ,category_set_id = l_cat_rec.cat_set_id
378: WHERE activity_product_id = l_activity_product_id;
379: ELSE
397:
398: -- R12 : Changes due to Marketing Requirement for data migration
399: BEGIN
400:
401: UPDATE AMS_ACT_PRODUCTS A
402: SET (A.CATEGORY_ID, A.CATEGORY_SET_ID) =
403: (SELECT B.CATEGORY_ID, B.CATEGORY_SET_ID
404: FROM MTL_ITEM_CATEGORIES B,
405: MTL_DEFAULT_CATEGORY_SETS D