External db in sql FROM

  • Thread starter Thread starter Becky
  • Start date Start date
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
 
On Sat, 13 Feb 2010 09:21:01 -0800, Becky

Much simpler to first link those tables.

-Tom.
Microsoft Access MVP
 
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
 
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.
 
Back
Top