I need help writing some SQL. I hate to ask such a rookie question, but what is wrong with the following SQL query?
select (case when mydate < '2010-1-1' Then '2000-1-1' ELSE mydate) from mytable;
The idea is that I want to get mydate from mytable, but if the date is before January, 1, 2010, I want the statement to return January 1, 2000 instead.
You are missing an
end