select c.code code,c.name name from rpt_region_2005_商贸专业 c where regionid in (select regionid from rpt_region_2005_商贸专业 where areacode in (select code from rpt_region_2005 where HIERACHYCODE like 'root00001%' and regiontype=1) and regionid in (select regionid from rpt_rcmember where collectionid=111)) and c.regionid in( select a.regionid from (select regionid from rpt_region_2005_商贸专业 where regionid in (select regionid from rpt_region_2005_商贸专业 where areacode in (select code from rpt_region_2005 where HIERACHYCODE like 'root00001%' and regiontype=1) and regionid in (select regionid from rpt_rcmember where collectionid=111))) a left join (select a.regionid from rpt_rpt_2005_sm a where a.reportFlag='1' and a.reportTemplateID=1802 and a.year=2005 and a.specialityCode='商贸专业' and a.month=1 and a.regionid in (select regionid from rpt_region_2005_商贸专业 where areacode in (select code from rpt_region_2005 where HIERACHYCODE like 'root00001%' and regiontype=1) and regionid in (select regionid from rpt_rcmember where collectionid=111))) b on a.regionid=b.regionid where b.regionid is null) order by c.code
Oracle 9i windows aix区别
最新推荐文章于 2021-04-09 20:18:34 发布