Trouble converting this case when statement in SQL to qlikview syntax
Hi there,
Can someone help me translate the following case when statement in SQL to a syntaxt that qlikview will understand in the load statement? In the statement below TIME is my date field. YEAR is an nvarchar data type. An example of a value for YEAR is 'F2011'. I can't seem to get this to work in qlikview.
case when TIME in ('Jan','Feb','Mar') then convert(smalldatetime,right(YEAR,4)+ TIME) else dateadd(month,-12,convert(smalldatetime,right(YEAR,4)+ TIME)) end as Date