Friday, August 31, 2012

Instance Migration Scripts - Value sets


--  Check Value Sets (Table Type)
SELECT *
  FROM apps.fnd_flex_validation_tables
 WHERE flex_value_set_id IN (
                             SELECT flex_value_set_id
                               FROM apps.fnd_flex_value_sets
                              WHERE flex_value_set_name =
                                                         'XYZ_COR_ORDER_VS')
                                                        
--  Check Value Sets (Independent)
SELECT *
  FROM apps.fnd_flex_values
 WHERE flex_value_set_id IN (
                             SELECT flex_value_set_id
                               FROM apps.fnd_flex_value_sets
                              WHERE flex_value_set_name =
                                                         'XYZ_ORDER_TYPES_VS')
ORDER BY flex_value                                                         

--  Delete values from Independent Value set
 FND_FLEX_VAL_API.DELETE_VALUESET(v_valueset);
dbms_output.put_line('Droped the Valueset'||v_valueset);