I have this following query statement :
SELECT DISTINCT
CASE WHEN activity_id='2' then activity_date ELSE '' END as
activity_date
If the activity id is 2, then I want the activity date. If it
is not 2, then I do not want the date, leave blank.
When I run this thru query analyzer, the dates that are not
equal to 2 come out as 1900-01-01 00:00:00.000.
I then try to eliminate by using Where activity_date <>
'1900-01-01 00:00:00.000' but that does not do any good.
My final cfoutput shows the date as 01/01/2009 for activity
id 2 and 01/01/1900 for activity id not 2, using dateformat. How
can I eliminate this date ?
The datatype is datetime, length 8, in sql server.