The CASE syntax in your given query is not correct. It should be like this:
Case When ASKME_CREAT_DT Between ('2012/08/29') and ('2012/08/30') Then 'AM'
Else 'unknown'
END AS TimeofDAY
↧