select sl4.salesid,sl4.itemid,sl4.LINENUM,sl4.CREATEDDATE from I5Production.dbo.SALESLINE as SL4
where NOT EXISTS
( select SL12.salesid,SL12.ITEMID,SL12.LINENUM From AxDev.dbo.SALESLINE SL12
where sl4.salesid = SL12.salesid
and sl4.itemid = SL12.ITEMID
and sl4.LINENUM = SL12.LINENUM
and sl4.DATAAREAID = SL12.DATAAREAID
and sl4.DATAAREAID = 'i5d'
--and sl4.CREATEDDATE > '2015-12-31'
--and sl4.SALESID ='S10099614'
);
where NOT EXISTS
( select SL12.salesid,SL12.ITEMID,SL12.LINENUM From AxDev.dbo.SALESLINE SL12
where sl4.salesid = SL12.salesid
and sl4.itemid = SL12.ITEMID
and sl4.LINENUM = SL12.LINENUM
and sl4.DATAAREAID = SL12.DATAAREAID
and sl4.DATAAREAID = 'i5d'
--and sl4.CREATEDDATE > '2015-12-31'
--and sl4.SALESID ='S10099614'
);
No comments:
Post a Comment