该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
declare cursor userinfo_cur is
select distinct upper(substr(t.report_name,1,(case when instr(t.report_name,' ')=0 then length(t.report_name)
else instr(t.report_name,' ')-1 end)))
from eip_meta_detail_etl_MWW t;
begin
FOR userinfo_rec in userinfo_cur
loop
CREATE OR REPLACE VIEW V_EIP_META_DETAIL_ETL_YX_MWW AS
SELECT distinct E.Child_Id,
(case when LEVEL=1 then '|_'||E.REPORT_NAME
when LEVEL=2 then ' |__'||E.REPORT_NAME
when LEVEL=3 then ' |__'||E.REPORT_NAME
when LEVEL=4 then ' |__'||E.REPORT_NAME
when LEVEL=5 then ' |__'||E.REPORT_NAME
when LEVEL=6 then ' |__'||E.REPORT_NAME
when LEVEL=7 then ' |__'||E.REPORT_NAME
when LEVEL=8 then ' |__'||E.REPORT_NAME
when LEVEL=9 then ' |__'||E.REPORT_NAME
when LEVEL=10 then ' |__'||E.REPORT_NAME
when LEVEL=11 then ' |__'||E.REPORT_NAME
when LEVEL=12 then ' |__'||E.REPORT_NAME
when LEVEL=13 then ' |__'||E.REPORT_NAME
when LEVEL=14 then ' |__'||E.REPORT_NAME
when LEVEL=15 then ' |__'||E.REPORT_NAME
when LEVEL=16 then ' |__'||E.REPORT_NAME
end ) as EREPORT_NAME,
E.Father_Id, E.REPORT_NAME,E.NAME,E.TABLE_SOURCE,E.REPORT_SOURCE, E.RELATION,E.REF_COL1,E.REF_COL2||E.REF_COL3 AS REF_COL3,REF_COL4||REF_COL5||REF_COL6 AS REF_COL6,E.REMARK,LEVEL as bi_level
FROM eip_meta_detail_etl_MWW E
START WITH E.Child_Id in (select Child_Id from v_eip_meta_detail_etl_MWW t
where REPORT_NAME like 'userinfo_rec')
CONNECT BY PRIOR E.Father_Id=E.Child_Id
order by 'A'||Child_Id desc;
end loop;
end;
这是一段plsql,那位大神帮忙指导一下怎么才能成功把
select distinct upper(substr(t.report_name,1,(case when instr(t.report_name,' ')=0 then length(t.report_name)
else instr(t.report_name,' ')-1 end)))
from eip_meta_detail_etl_MWW t;
所找出的唯一的report_name根据一定的逻辑插入一张表中