Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Re: Create an alert when shipdate changed

$
0
0

Hi Rafael,

 

Try:

 

SELECT T0.DocNum, T0.CardCode, T1.ShipDate, T2.ShipDate

FROM ORDR T0

JOIN RDR1 T1 ON T1.DocEntry=T0.docEntry

JOIN ADO1 T2 ON T2.DocEntry=T1.DocEntry and T2.ObjType='17' AND T2.LineNum=T1.LineNum

WHERE DateDiff(d,T0.DocDate,GetDate())=0 and T1.ShipDate != (SELECT Top 1 ShipDate FROM ADO1 WHERE DocEntry=T1.DocEntry and ObjType='17' AND LineNum=T1.LineNum ORDER BY LogInstanc DESC)

 

Thanks,

Gordon


Viewing all articles
Browse latest Browse all 8944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>