Hi guys,

Looking for help with a SQL select query with several conditions, want to know if this is possible:

I have:


(All short date format)

All in the same table "TblOrderDetails"

I want a query that displays any CDD that are within 7 days of the today's date (or when the query is run).

However, if CompletionDate has an entry, then the query doesn't display the result as "due".

Also, if AmendedCDD has an entry in it, then the query ignores "CDD" and compares the AmendedCDD and CompletionDate instead.

Any ideas?