Run SQL queries
select SL.SALESID, SL.CREATEDDATETIME, sl.ECOMSALESID, SL.ORDERSKUID, sl.ITEMID, sl.SALESQTY, SL.LINEAMOUNT, SL.SALESSTATUS, id.INVENTSITEID, id.INVENTLOCATIONID from SALESLINE as SL
Join INVENTDIM as ID
ON ID.INVENTDIMID = SL.INVENTDIMID
And ID.DATAAREAID = sl.DATAAREAID
where SL.SALESQTY < 0
And sl.DATAAREAID = 'tsc'
And SL.CREATEDDATETIME >= '2017-04-01'
And SL.CREATEDDATETIME <= '2018-01-31'
........................................................................
select ECOMT.ORDERSKUID,ECOMT.SOPOSTERRORMSG,ECOMT.COURIERPICKDATETIME,SLIN.HSNCODETABLE, SL.ORDERSKUID,SL.SALESID,SL.TAXGROUP,SL.SALESSTATUS from SALESLINE as SL
join INBOUNDWEBORDERLINE as IWL on IWL.SALESID = SL.SALESID
and IWL.ITEMID = SL.ITEMID
join ECOMMANIFESTTABLE as ECOMT on ECOMT.ORDERSKUID = IWL.ORDERSKUID
join INBOUNDWEBORDERHEADER as IWH on IWH.EcomSalesId = IWL.ECOMSALESID
join ALLE_MANIFESTSTATUS as AMS on AMS.ECOMMANIFESTTABLE = ECOMT.RECID
join SALESLINE_IN as SLIN on SLIN.SALESLINE = SL.RECID
where SLIN.HSNCODETABLE = 0
AND ECOMT.POSTED = 0
AND IWL.ONHOLD = 0
AND IWL.ISRENTALORDER = 0
AND IWH.ONHOLD = 0
AND SL.DATAAREAID = 'tsc'
AND SLIN.DATAAREAID = SL.DATAAREAID
AND IWH.ORDERCONFIRMATIONDATE >= '2017-01-01'
And ECOMT.COURIERPICKDATETIME >= '2017-04-01'
And ECOMT.COURIERPICKDATETIME <= '2017-06-30'
select SL.SALESID, SL.CREATEDDATETIME, sl.ECOMSALESID, SL.ORDERSKUID, sl.ITEMID, sl.SALESQTY, SL.LINEAMOUNT, SL.SALESSTATUS, id.INVENTSITEID, id.INVENTLOCATIONID from SALESLINE as SL
Join INVENTDIM as ID
ON ID.INVENTDIMID = SL.INVENTDIMID
And ID.DATAAREAID = sl.DATAAREAID
where SL.SALESQTY < 0
And sl.DATAAREAID = 'tsc'
And SL.CREATEDDATETIME >= '2017-04-01'
And SL.CREATEDDATETIME <= '2018-01-31'
........................................................................
select ECOMT.ORDERSKUID,ECOMT.SOPOSTERRORMSG,ECOMT.COURIERPICKDATETIME,SLIN.HSNCODETABLE, SL.ORDERSKUID,SL.SALESID,SL.TAXGROUP,SL.SALESSTATUS from SALESLINE as SL
join INBOUNDWEBORDERLINE as IWL on IWL.SALESID = SL.SALESID
and IWL.ITEMID = SL.ITEMID
join ECOMMANIFESTTABLE as ECOMT on ECOMT.ORDERSKUID = IWL.ORDERSKUID
join INBOUNDWEBORDERHEADER as IWH on IWH.EcomSalesId = IWL.ECOMSALESID
join ALLE_MANIFESTSTATUS as AMS on AMS.ECOMMANIFESTTABLE = ECOMT.RECID
join SALESLINE_IN as SLIN on SLIN.SALESLINE = SL.RECID
where SLIN.HSNCODETABLE = 0
AND ECOMT.POSTED = 0
AND IWL.ONHOLD = 0
AND IWL.ISRENTALORDER = 0
AND IWH.ONHOLD = 0
AND SL.DATAAREAID = 'tsc'
AND SLIN.DATAAREAID = SL.DATAAREAID
AND IWH.ORDERCONFIRMATIONDATE >= '2017-01-01'
And ECOMT.COURIERPICKDATETIME >= '2017-04-01'
And ECOMT.COURIERPICKDATETIME <= '2017-06-30'
No comments:
Post a Comment