Using SQL Sever 2005
Table1
ID StartDate EndDate
001 02/23/2010 07/22/2010
002 05/03/2010 null
003 02/02/2011 null
...
Table2
Date
02/24/2011
02/25/2011
...
...
Condition
- If the
enddateis not null thenstartDatecompare with max(date) from table2, if the startdate > 6 month then it should display as “Expired”
How to make a query for the above condition.
Need query Help.
1 Answer