I am having a problem setting up my date boundaries for the query.
I want records between 10/1/2010 and 12/31/2010, but without a record (activity) in calendar year 2011 to date.
where INV.Date_Imported BETWEEN '10/1/2010' AND '12/31/2010'
AND INV.RecID NOT IN (
SELECT RecID
FROM [VW_Invoice_All]
WHERE Date_Imported > '1/1/2011'
)
The only glaring issues I see is your
Date_Importedline. If you want 1/1/2011 to be included in theNOT INquery, you need to change the query toBETWEENis already inclusive, which is what you appear to be going for.