This commit is contained in:
杰 朱
2021-12-06 15:17:24 +08:00
parent b8018ff5bb
commit 9cfcda7415

View File

@@ -870,7 +870,7 @@ select *from tempdb..tablepzck20210526
(SELECT ipesodid, sum(iQuantity) AS cqty (SELECT ipesodid, sum(iQuantity) AS cqty
FROM rdrecords32 WITH (nolock) FROM rdrecords32 WITH (nolock)
GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'') GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'')
where aa.cInvCode=a.cInvCode and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0 where aa.cInvCode=a.cInvCode and isnull( bb.cCloser ,'') ='' and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0
group by aa.cInvCode group by aa.cInvCode
) )>0 then 0 else ( ) )>0 then 0 else (
isnull( isnull(
@@ -882,7 +882,7 @@ select *from tempdb..tablepzck20210526
(SELECT ipesodid, sum(iQuantity) AS cqty (SELECT ipesodid, sum(iQuantity) AS cqty
FROM rdrecords32 WITH (nolock) FROM rdrecords32 WITH (nolock)
GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'') GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'')
where aa.cInvCode=a.cInvCode and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0 where aa.cInvCode=a.cInvCode and isnull( bb.cCloser ,'') =''and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0
group by aa.cInvCode group by aa.cInvCode
) ) end as kcyl ) ) end as kcyl
, ,