tsql - Parameter checking in Transact-SQL (SQL Server 2008): IF/OR/raiserror syntax error -


i have snippet of code checks input variable within range:

if (@vthingid < 17 or @vthingid > 16381) begin     raiserror('thing id out of range: must between 17 , 16381')     return end 

this t-sql code inside stored procedure. error message, on "compiling" stored procedure, this:

msg 102, level 15, state 1, server *-, procedure np*****, line 19
incorrect syntax near ')'.

i've tried changing syntax- removing parentheses, taking out or statement, putting semicolons after lines, etc. doesn't seem make difference, , can't spot syntax errors here.

the severity , state of raiserror function not optional. check documentation , decide values make sense you.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -