SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Selecting data from different databases
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 09/04/2000 :  11:52:55  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
GianMarco writes "I need to make a view that includes external data in different DB (still sql, on the same server). How can I do it? In acces I can link external table and then create my query but in Sql?"

Article Link.

redtide
Starting Member

1 Posts

Posted - 11/23/2003 :  23:53:07  Show Profile  Reply with Quote
Any idea on how to use JOIN between tables from two different databases? The databases are on the same server. I tried to follow this syntax, but I couldn't get it to work.

Thanks in advance.
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

United Arab Emirates
1456 Posts

Posted - 11/24/2003 :  00:50:22  Show Profile  Visit mohdowais's Homepage  Reply with Quote
Did you follow the syntax correctly using a three part name?

SELECT a.col1, b.col2 FROM
database1..tablea a INNER JOIN database2..tableb b
ON a.col3 = b.col3

Also, the user must have select permissions on both tables, which also means the user must exist in both databases.

Owais


Where there's a will, I want to be in it.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000