I have this:
SELECT
@is_daily_rollup = CASE WHEN rt.[id]=1 THEN 1 ELSE 0,
@is_weekly_rollup = CASE WHEN rt.[id]=2 THEN 1 ELSE 0
But sql server is complaining about syntax. How would I go about implementing this conditional value into a variable?
For a
CASEstatement you need to provide anENDso your full query would be: