SELECT * FROM (SELECT t0.FNUMBER fnumber, t0_L.FNAME fname, t0_L.FSPECIFICATION fspecification, t0.FDOCUMENTSTATUS fdocumentstatus, t0.FFORBIDSTATUS fforbidstatus, t1.FERPCLSID ferpclsid, t1.FBASEUNITID fbaseunitid_id, t0.FUSEORGID fuseorgid, t0.FUSEORGID fuseorgid_id, t0.FMATERIALGROUP fmaterialgroup, t0.FMATERIALID fmaterialid, t0.FMASTERID fmasterid, ROW_NUMBER() OVER( ORDER BY t0.FNUMBER ASC) fidentityid FROM T_BD_MATERIAL t0 LEFT OUTER JOIN t_BD_MaterialBase t1 ON t0.FMATERIALID = t1.FMATERIALID LEFT OUTER JOIN T_BD_MATERIAL_L t0_L ON (t0.FMATERIALID = t0_L.FMATERIALID AND t0_L.FLocaleId = 2052) WHERE ((t0.FFORBIDSTATUS = 'A' AND t0.FUSEORGID = 1) AND (t0.FUSEORGID IN (1, 0) AND EXISTS (SELECT 1 FROM T_BD_MATERIALGROUP TGRP01 WHERE (t0.FMATERIALGROUP = TGRP01.FID AND TGRP01.FID = 100053))))) tlist WHERE ((fidentityid >= 1) AND (fidentityid <= 200)) OPTION ( MAXDOP 0)

posted on 2018-12-09 22:38  RogerLu  阅读(384)  评论(0编辑  收藏  举报