on 07-23-2008 7:45 PM
Hi All
I need to query to get sales order based on tomorrow date.
scenario:
Sales orders are imported using DTW and due date is put in as tomorrow , so i need a query to show me all the imported orders based on due date.
check below the query i'm using
SELECT T0.DocNum, T0.DocDueDate, T0.CardCode, T0.CardName, T0.DocTotal, T0.U_ROUTEMARKTN, T0.U_ROUNDS, T0.U_DAYOFWEEK
FROM [dbo].[ORDR] T0
WHERE DATEDIFF(Day, T0.DocDUEDate, GETDATE()) = 0
ORDER BY T0.U_ROUTEMARKTN, T0.U_ROUNDS, T0.U_DAYOFWEEK, T0.DocDueDate
thanks
Hi Bongani,
Change your query condition to:
WHERE DATEDIFF(Day, T0.DocDUEDate, GETDATE(), T0.DocDUEDate) = 1
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.