Karl Rhodes (googlegroups@c ortexa.co.uk) writes:
The exact reason for the error is that you pass parameters to the
command batch where you create the procedure. That does not fly. Nor
would there be any point to so so.
But I completely agree with Stephany Young's analysis. That stored
procedure is completely meaningless, so it's a good thing that
you are not able to create it.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se
Books Online for SQL Server 2005 at
Books Online for SQL Server 2000 at
When I run this and check SQL Profiler I see the text "exec
sp_executesql N'" before the word "CREATE" and get the error
"incorrect syntax near the keyword 'PROCEDURE'"
>
Can anyone see where I'm going wrong, or does anyone know how to
dynamically create a stored procedure in a sql server database in this
way?
sp_executesql N'" before the word "CREATE" and get the error
"incorrect syntax near the keyword 'PROCEDURE'"
>
Can anyone see where I'm going wrong, or does anyone know how to
dynamically create a stored procedure in a sql server database in this
way?
command batch where you create the procedure. That does not fly. Nor
would there be any point to so so.
But I completely agree with Stephany Young's analysis. That stored
procedure is completely meaningless, so it's a good thing that
you are not able to create it.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se
Books Online for SQL Server 2005 at
Books Online for SQL Server 2000 at
Comment