I'm basically trying to produce a report that displays a filtered list of all of our invoices for the current week. (This report will be done on wednesdays, so all of the invoices since the last wednesday)
This is the code that I have for my WHERE statement:
WHERE e.TotalCount = 1 OR e.LastThreeMonths = 1
AND OINV.[TaxDate] >= (GETDATE() - 7)
The first part (e.TotalCount....) is all fine and fits in, but even with the second filter in, the query still returns all of the results regardless of date.
Am I being a complete idiot or should this work as expected to..?