采购订单列表点分组后报错
金蝶云社区-时向宇
时向宇
1人赞赏了该文章 303次浏览 未经作者许可,禁止转载编辑于2016年11月17日 10:39:07

具体的报错SQL如下:T1不知道是什么表没有关联上

[code]SELECT *
FROM (SELECT t0.FBILLNO FBILLNO,
t0.FDATE FDATE,
t0.FSUPPLIERID FSUPPLIERID_ID,
t0.FDOCUMENTSTATUS FDOCUMENTSTATUS,
t0.FPURCHASEORGID FPURCHASEORGID_ID,
t0.FCLOSESTATUS FCLOSESTATUS,
t3.FMATERIALID FMATERIALID_ID,
t3.FUNITID FUNITID_ID,
t3.FQTY FQTY,
t3_D.FDELIVERYDATE FDELIVERYDATE,
t3.FGIVEAWAY FGIVEAWAY,
t3.FMRPCLOSESTATUS FMRPCLOSESTATUS,
t0.FBILLTYPEID FBILLTYPEID,
t0.FPURCHASEORGID FPURCHASEORGID,
t0.FOBJECTTYPEID FOBJECTTYPEID,
t0.FID FID,
t3.FENTRYID T3_FENTRYID,
t3.FSeq T3_FSEQ,
ROW_NUMBER() OVER(ORDER BY t0.FCREATEDATE DESC, t0.FBILLNO DESC, t3.FSeq ASC) FIDENTITYID
FROM t_PUR_POOrder T0
LEFT OUTER JOIN t_PUR_POOrderEntry T3
ON t0.FID = t3.FID
LEFT OUTER JOIN t_PUR_POOrderEntry_D T3_D
ON t3.FENTRYID = t3_D.FENTRYID
WHERE ((t0.FPURCHASEORGID IN (1, 100007, 100008)) AND
(((t0.FPURCHASEORGID IN (1, 0)) AND
t0.FOBJECTTYPEID = 'PUR_PurchaseOrder') AND
t1.FPAYCONDITIONID = '20001'))) TLIST
WHERE ((fidentityid >= 1) AND (fidentityid <= 200))
[/code]