External db in sql FROM

B

Becky

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
 
T

Tom van Stiphout

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

Much simpler to first link those tables.

-Tom.
Microsoft Access MVP
 
M

Marshall Barton

Becky said:
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
 
D

David W. Fenton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top