Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF in WHERE clause

Status
Not open for further replies.

griffitd

Programmer
Aug 20, 2002
189
GB
Hi

Wnat i want to do is the following

WHERE
IF Table1.date1 is null then
table2.date2 between @FirstDate AND @LastDate
else
table1.date2 between @FirstDate AND @LastDate

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top