A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

External db in sql FROM



 
 
Thread Tools Display Modes
  #1  
Old February 13th, 2010, 05:21 PM posted to microsoft.public.access.queries
Becky
external usenet poster
 
Posts: 230
Default External db in sql FROM

I need help with some sql. What is the proper syntax for the following? I'm
in one database, but trying to get data from an external another one.

FROM tblProducts IN C:\2009Cat\ABC.mdb INNER JOIN
tblSales IN C:\2009Cat\ABC.mdb
ON tblProducts.ProdID = tblSales.ProdID

The way I've shown it doesn't work.

thank you
Becky
  #2  
Old February 13th, 2010, 06:02 PM posted to microsoft.public.access.queries
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default External db in sql FROM

On Sat, 13 Feb 2010 09:21:01 -0800, Becky
wrote:

Much simpler to first link those tables.

-Tom.
Microsoft Access MVP


I need help with some sql. What is the proper syntax for the following? I'm
in one database, but trying to get data from an external another one.

FROM tblProducts IN C:\2009Cat\ABC.mdb INNER JOIN
tblSales IN C:\2009Cat\ABC.mdb
ON tblProducts.ProdID = tblSales.ProdID

The way I've shown it doesn't work.

thank you
Becky

  #3  
Old February 13th, 2010, 06:07 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default External db in sql FROM

Becky wrote:

I need help with some sql. What is the proper syntax for the following? I'm
in one database, but trying to get data from an external another one.

FROM tblProducts IN C:\2009Cat\ABC.mdb INNER JOIN
tblSales IN C:\2009Cat\ABC.mdb
ON tblProducts.ProdID = tblSales.ProdID

The way I've shown it doesn't work.



What actually happens? "it doesn't work" is remarkably low
on information content.

The paths should be in quotes. e.g.
IN "C:\2009Cat\ABC.mdb"

An alterantive is this kind of syntax:
FROM [C:\2009Cat\ABC.mdb].tblProducts

--
Marsh
MVP [MS Access]
  #4  
Old February 13th, 2010, 11:32 PM posted to microsoft.public.access.queries
David W. Fenton
external usenet poster
 
Posts: 3,373
Default External db in sql FROM

Tom van Stiphout wrote in
:

I need help with some sql. What is the proper syntax for the
following? I'm in one database, but trying to get data from an
external another one.

FROM tblProducts IN C:\2009Cat\ABC.mdb INNER JOIN
tblSales IN C:\2009Cat\ABC.mdb
ON tblProducts.ProdID = tblSales.ProdID

The way I've shown it doesn't work.


Much simpler to first link those tables.


I disagree. If it's not a permanent linked table, or if you want to
isolate it from the particular front end for some reason, using the
IN can work fine.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
  #5  
Old February 13th, 2010, 11:33 PM posted to microsoft.public.access.queries
David W. Fenton
external usenet poster
 
Posts: 3,373
Default External db in sql FROM

Marshall Barton wrote in
:

The paths should be in quotes. e.g.
IN "C:\2009Cat\ABC.mdb"


The QBE always uses single quotes on this.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.