Msg 156, Level 15, State 1, Line 134 Incorrect syntax near the keyword 'else'The variable is declared and I am using the same SET with other variables.
if exists (select * from #a where s = @FileName) --SET @FileExists = 'Y' print @PATH + @Filename + ' exists' else --SET @FileExists = 'N' print @PATH + @Filename + ' does not exist' drop table #a