![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How do I set up a sql statement to use as a view? I want to use two tables but they are both from different databases. From the Offices database I want to use a table called Office Code and only the Name column The other database is called Library and I want to use a table called Requestors and join it to others. |
#3
| |||
| |||
|
|
JJ297 (nc... (AT) yahoo (DOT) com) writes: How do I set up a sql statement to use as a view? I want to use two tables but they are both from different databases. From the Offices database I want to use a table called Office Code and only the Name column The other database is called Library and I want to use a table called Requestors and join it to others. You refer to a table in a different database with three-part notation. For instance: Offices.dbo.[Office Code] -- Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
![]() |
| Thread Tools | |
| Display Modes | |
| |