Looks like you can't join the procedure name and the variables in the one string. I can't find anything in the manuals stating this - but I know below should work:
select @statement = "proc_glove_1"
select @a = {your first variable value}, @b = {your 2nd variable value}
Exec...
I got around the same problem (bad February dates in char fields) by validating as a string.
For example, when the date is in YYYYMMDD format e.g. ("20000231"):
If substring(@date, 5, 2) = "02" and convert(int, substring(@date, 7, 2)) > 29
print "error"...
The GOTO statement allows you to jump to a specific code section.
1. Provide a label for your code section (e.g. DoStuff). Don't forget the colon.
DoStuff:
Select col_a from table_b
2. Use GOTO to jump to the code section.
GOTO DoStuff
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.