Dynamically Change Server and DB Names in Stored Procedure
Posted
by hgulyan
on Stack Overflow
See other posts from Stack Overflow
or by hgulyan
Published on 2010-06-09T06:21:40Z
Indexed on
2010/06/09
6:22 UTC
Read the original article
Hit count: 317
sql-server
|dynamic-sql
I have the same query in a stored procedure that needs to be executed on different servers and databases according to parameters.
How can I arrange this without exec or sp_executesql?
I'm using SQL Server 2008.
Thank you.
© Stack Overflow or respective owner