Friday, April 10, 2015

Query to get ‘Course’ Data

create or replace view  LSG_CATL_OBJ_COURSES_V
as select ocu.PARENT_CAT_USAGE_ID,ocup.category parent_ctagory,ocu.CATEGORY_USAGE_ID,ocu.category,ocu.type,ocu.DATA_SOURCE, oav.version_code,oav.version_name,oav.activity_version_id
from ota_category_usages ocu, ota_category_usages ocup,ota_activity_definitions oad,ota_activity_versions oav
where 1=1
and ocup.CATEGORY_USAGE_ID = ocu.PARENT_CAT_USAGE_ID
and ocu.CATEGORY_USAGE_ID = oad.CATEGORY_USAGE_ID
and oav.activity_id = oad.activity_id

1 comment: