August 12, 2001 at 5:45 am
Does anybody know how can I execute SQL instruction that stored in local variable. For example @var='SELECT AuthorName from Authors'. Variable stoging gives me ability to create dynamic queries.
August 12, 2001 at 6:00 am
Check out sp_executesql in SQL Server's Books On Line. This allows you to execute a sql statement or batch that you have built. An alternative would be to use the EXECUTE statement.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply