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
 General SQL Server Forums
 New to SQL Server Programming
 Database Access

Author  Topic 

boreddy
Posting Yak Master

172 Posts

Posted - 2008-04-23 : 01:59:39
Currently i am working in one database if i want to access this database table to some other database is it possible

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-23 : 02:45:23

select * from dbname..tablename

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-23 : 04:39:34
Are your two databases in same server? If yes,use as suggested by Madhi. If they are in diffrent servers you need to add one server as linked server to other or use OPENROWSET() function.
Go to Top of Page

boreddy
Posting Yak Master

172 Posts

Posted - 2008-04-23 : 05:29:17
they are in diffrent servers pls give me example(possible ways)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-23 : 05:39:05
You have to create a linked server.
Examples can be found in Books Online.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -