using SELECT and case expression
Posted: Wed Apr 06, 2005 6:05 am
i want in the select sentence to check which month is the current date and by that to return the value.
for example if the current month is '02' then the returned values is '1' (for teling me that month 02 is in quarter 1!)
i tried to do
but got an empty line!
any idea why?
thnaks in advance
peleg
for example if the current month is '02' then the returned values is '1' (for teling me that month 02 is in quarter 1!)
i tried to do
Code: Select all
select * from order_header where order_id=532 and case from_unixtime(done_date,'%m') when '02' then 'feee' END;any idea why?
thnaks in advance
peleg