Skip to Content
author's profile photo Former Member
Former Member

Alert for orders based on due date

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 07:00 PM

    Hi Bongani,

    Change your query condition to:

    WHERE DATEDIFF(Day, T0.DocDUEDate, GETDATE(), T0.DocDUEDate) = 1

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.