Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rauof_thameem
Starting Member
31 Posts |
Posted - 2007-05-07 : 08:59:39
|
| i am pulling data from one server to other serverin my query i am using [Server name].[database name].[schema name].[table name]i having many produres where i will be using this one to specify the tables..,if the server name changes i have to change these things all the queriesis there any way to maintain the server name as globly and acces the server name where ever i need.., |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-05-07 : 09:04:49
|
| Possible optionsIf @server_name='something'--Select using that server..Otherwise Dynamic sql is the wayBut why do you want to pass Db name as parameter?MadhivananFailing to plan is Planning to fail |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-07 : 09:10:09
|
| If this is limited to few tables, I will suggest creating view around these tables and use view instead in your SPs.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|