I am programing in VS 2008. I have a small list of dates that are stored in memory and a table that also contains dates. I would like to return those dates in my list that are not in the table. I know I could loop through the dates and check each one against the table. But I was hoping to do this in one select statement. Can it be done? And if so how?
I will use letters rather than actual dates to reduce my typing here.
List of dates = a, b, c, d, e, f
Datetable contains c, e
Desired result set = a, b, d, f
If this list of dates were in its own table rather than memoryI could do
Select DesiredDate From DateTable1 where DesiredDate not in( Select DesiredDate from DateTable2)
Is there any way to accomplish this without first putting my date list into a table?