1
This commit is contained in:
@@ -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
|
||||||
,
|
,
|
||||||
|
|||||||
Reference in New Issue
Block a user