View Single Post
  #1 (permalink)  
Old November 17th, 2011, 05:17 PM
mnp13 mnp13 is offline
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Case statement in Where

I need to compare dates in my where clause, and based on the result, decided what statement to use.

Here it is in normal English:

SELECT DATA
FROM TABLE
WHERE
IF date1 = date2
THEN USE date3 > date4 for the select
ELSE USE date1 > date2 for the select

I tried CASE, but I'm not doing something right.

Any help would be appreciated!!

Thanks,

Michelle