Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error with SET
Message
From
17/06/2008 13:26:23
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Error with SET
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01324831
Message ID:
01324831
Views:
52
If I uncomment the two lines in the code below, I get this error:
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
Next
Reply
Map
View

Click here to load this message in the networking platform