I have 2 tables and each one has a date field. Is it possible to write a simple query to get the records with the dates in table1 but not in table2?
For example:
TABLE 1
-----------------------------------------------------------------------------
Branch_Name Sales Date
-----------------------------------------------------------------------------
Los Angeles 1500 May-15-2010
San Diego 250 May-27-2010
Los Angeles 300 May-28-2010
Boston 700 May-28-2010
TABLE 2
-----------------------------------------------------------------------------
Date Sales
-----------------------------------------------------------------------------
May-27-2010 250
May-20-2010 535
May-21-2010 320
May-22-2010 750
The query result should be:
May-15-2010
May-28-2010
I guess that a query with a subselect and the EXCEPT keyword would work but I would like to know if there is a simpler alternative?
With respect,
Jorge Maldonado