386:
387: -- Cursor to check if ANALYTICS data source is used in any models
388: CURSOR c_analytics_ds_used (l_id IN NUMBER) IS
389: SELECT count(*)
390: FROM AMS_DM_MODELS_VL m, AMS_DM_TARGETS_VL t
391: WHERE m.TARGET_ID = t.TARGET_ID
392: AND t.data_source_id = l_id;
393:
394: -- Cursor to get the target_ids associated with this data source
393:
394: -- Cursor to get the target_ids associated with this data source
395: CURSOR c_get_ds_targets (l_id IN NUMBER) IS
396: SELECT target_id
397: FROM ams_dm_targets_vl t
398: WHERE t.data_source_id = l_id;
399:
400: BEGIN
401: --------------------- initialize -----------------------