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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to access table from different database

Author  Topic 

riteshsc
Starting Member

3 Posts

Posted - 2008-04-11 : 05:35:29
hi,
i am using stored procedure which put data in another table fron different database.

so i am using servername.databasename.dbo.tablename.

if I am change the servername then i have to edit the Stored procedure.
Is there any way to access server name.so that if server name is chane then also i dont have to change stored procedure.

Like in c we use #define where we change value of variable that is reflected in whole program.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-11 : 05:45:01
This didn't help you?

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=100691

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -