Hi i want to run an if statement but keep getting syntax errors near all my AS aliases, what am i doing wrong?
SELECT IF @Origin = \'ALL\' (SELECT COUNT(*
You forgot the BEGIN...
IF (@Origin = 'ALL') BEGIN -- END ELSE BEGIN -- END