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(*
IF condition BEGIN -- ... END ELSE BEGIN -- ... END