473,327 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Query on 2 bases

TNR
How to make a query which contains fields from two different bases ?

Thanks in advance.

ReN
Jul 20 '05 #1
2 1935
This request was posted earlier today under the title "Inter-Database
References"

John
"TNR" <st****@tgs.fr> wrote in message
news:bg**********@news-reader5.wanadoo.fr...
How to make a query which contains fields from two different bases ?

Thanks in advance.

ReN

Jul 20 '05 #2
"John Bell" <jb************@hotmail.com> wrote in message news:<3f***********************@reading.news.pipex .net>...
This request was posted earlier today under the title "Inter-Database
References"

John
"TNR" <st****@tgs.fr> wrote in message
news:bg**********@news-reader5.wanadoo.fr...
How to make a query which contains fields from two different bases ?

Thanks in advance.

ReN


If your databases are on the same server then it's as simple as:

select *
from database1..table1 inner join database2..table2

if they are on different servers, then you'll need to add a linked
server to the database that you are running your query on. This can
be done through the GUI or by running sp_addlinkedserver system stored
procedure. Once you've done it then, the command is:

select *
from database1..table1 inner join linkedservername.database2..table2

Hope this helps
Hodge
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Pea | last post by:
I'm working with a system usage database. I want to filter out repetitive logins. The query I have retrieves data like this: USER_DATE USER_TIME1 USER_USERID USER_ACCOUNT...
1
by: Kevin.S.Campbell | last post by:
Greetings, I'm trying to run a sql query on a continous form. I have the query working correctly the way I want it. I want this query to be displayed on the form in the text box on the load...
7
by: DeZZar | last post by:
Hi all, Unfortunately I am quite a novice with Access!! I've created a number of data bases for my work however becuase my skills are limited to really built in functionality and wizards my...
0
by: Miles | last post by:
On Mon, Sep 15, 2008 at 6:06 AM, Harish K Vishwanath <harish.shastry@gmail.comwrote: "built-in type" generally means "implemented in C", also sometimes called "extension type". Both the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.