Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Views from tables across Multiple Databases 2

Status
Not open for further replies.

Mirak

Programmer
Aug 1, 2001
28
0
0
Hi,

I need some urgent assistance. I need to create views for a report, but the data that I need resides on different tables on two different databases on SQL Server. Is it possible to reference tables across databases. I know in MS Access its easy to link the tables and write the query, but I need for the query to reside on the server in a view. Is it possible to create the view using more than one databases....

thanks
 
You just 3-part qualify (out of 4) the table name:
TheDatabaseName.TheTableOwnerName.TheTableName and if you ever have to use multiple servers then add the linked server name to the beginning of that string.
-Karl
 
This also works for linked servers to like Oracle or Sybase on other boxes.


Hope I've been helpful,
Wayne Francis

If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top