select y.fdisplayname,x.fdisplayname from
(select fdisplayname,upper(freffilename) as freffilename from
(select fdisplayname,decode(instr(freffilename,'\'),0,freffilename,substr(freffilename,instr(freffilename,'\')+1,length(freffilename) - instr(freffilename,'\'))) as freffilename from
(select fdisplayname,decode(instr(freffilename,'\'),0,freffilename,substr(freffilename,instr(freffilename,'\')+1,length(freffilename) - instr(freffilename,'\'))) as freffilename from
(select fdisplayname,substr(freffilename,instr(freffilename,'\')+1,length(freffilename) - instr(freffilename,'\')) as freffilename from
(select fdisplayname,substr(freffilename,instr(freffilename,'\')+1,length(freffilename) - instr(freffilename,'\')) as freffilename from
(select t.fdisplayname,substr(freffilename,instr(freffilename,'\')+1,length(freffilename) - instr(freffilename,'\')) as freffilename from tfilegroup t where t.fkind = 'fgtFile')))))) x,
(select distinct fdisplayname, upper(FFUNCURL) as FFUNCURL from
(select fdisplayname,decode(instr(FFUNCURL,'\'),0,FFUNCURL,substr(FFUNCURL,instr(FFUNCURL,'\')+1,length(FFUNCURL) - instr(FFUNCURL,'\'))) as FFUNCURL from
(select fdisplayname,substr(FFUNCURL,instr(FFUNCURL,'\')+1,length(FFUNCURL) - instr(FFUNCURL,'\')) as FFUNCURL from
(select fdisplayname,substr(FFUNCURL,instr(FFUNCURL,'\')+1,length(FFUNCURL) - instr(FFUNCURL,'\')) as FFUNCURL from
(SELECT OS.fdisplayname, OI.FVALUE AS FFUNCURL FROM TORGSYSTEM OS, TORGINDEX OI WHERE OS.FKIND IN ('.PTM', '.PTN', '.PSM', '.PSN', '.ORG', '.DPT') AND OI.FGUID = OS.FGUID AND OI.FID = 'OrgUnit.FuncRef'))))) y
where x.freffilename = y.FFUNCURL order by y.fdisplayname
这样是否可以?但是发现对y中的FFUNCURL 直接distinct,记录数远多于x中的结果,是否是流程中的功能环节无法对应? |