The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
dim.longname dim_name
from
cmprelationmapping_v dim_map,
cmpwbdimension_v dim
where
dim_map.targetdataentity=dim.elementid; */
select
dim.dim_long_name dim_name
from edw_relationmapping_md_v dim_map,
edw_dimensions_md_v dim
where dim_map.targetdataentity=dim.dim_id;
select
src_relation.name table_name
from
cmprelation_v relation,
cmprelation_v src_relation,
cmprelationmapping_v dim_map,
cmprelationmapping_v lvl_map,
cmpwbrelationusage_v dim_ru,
cmpwbdimension_v dim
where
dim.longname=rtrim(p_dim_name)
and dim_map.targetdataentity=dim.elementid
and dim_ru.cmprelationmapping=dim_map.elementid
and dim_ru.source=1
and relation.elementid=dim_ru.cmprelation
and relation.classname='CMPWBTable'
and lvl_map.targetdataentity=relation.elementid
and src_relation.elementid=lvl_map.sourcedataentity; */
select lstg.relation_name table_name
from edw_relations_md_v ltc,edw_relations_md_v lstg,
edw_relationmapping_md_v map,edw_dimensions_md_v dim,
edw_levels_md_v lvl
where dim.dim_long_name=p_dim_name
and lvl.dim_id=dim.dim_id
and ltc.relation_name=lvl.level_name||'_LTC'
and map.targetdataentity=ltc.relation_id
and lstg.relation_id=map.sourcedataentity;
select cube.longname fact_name
from cmprelationmapping_v map,
cmpwbcube_v cube
where cube.elementid = map.targetdataentity; */
select cube.fact_longname fact_name
from edw_relationmapping_md_v map,edw_facts_md_v cube
where cube.fact_id = map.targetdataentity;**/
select cube1.fact_longname fact_name
from edw_relationmapping_md_v map1,edw_facts_md_v cube1
where cube1.fact_id = map1.targetdataentity
and cube1.fact_longname not in
(select distinct cube.fact_longname
from
edw_facts_md_v cube,
edw_facts_md_v cube_src,
edw_relationmapping_md_v map where
map.targetdataentity=cube.fact_id
and map.sourcedataentity=cube_src.fact_id);
select
relation.name table_name
from
cmprelation_v relation,
cmprelationmapping_v map,
cmprelation_v lvl_relation
where
lvl_relation.longname=rtrim(p_fact_name)
and map.targetdataentity=lvl_relation.elementid
and relation.elementid=map.sourcedataentity; */
select relation.relation_name table_name
from edw_relations_md_v relation,
edw_relationmapping_md_v map,
edw_relations_md_v lvl_relation
where lvl_relation.relation_long_name=p_fact_name
and map.targetdataentity=lvl_relation.relation_id
and relation.relation_id=map.sourcedataentity;
select
table_owner
from user_synonyms
where table_name=p_tab_name;