Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2006
    Posts
    3

    Unanswered: INNER JOIN on two databases

    I need to pull off an inner join and append on tables in seperate databases. Is this possible through jet?

    More precisely i have two databases, each with a different product table but with identical fields. I need to append all the products which do not appear in one database to the other.

    Any help would be SWEET.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    in one of the databases, create a linked table to the table in the other database, then write a simple append query

    File > Get External Data > Link Tables
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2006
    Posts
    3
    Ah yeah. Thanks for the post but sorry, linked table isn't an option. In fact, any manipulation of the DB structures is out. This needs to be done using a single regular old SQL statement.

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    You need to fully qualify your tables using the IN statement ... EX:

    SELECT ... FROM MyTable IN[F:\blah\blah.mdb] INNER JOIN MyOtherTable IN[G:\BlahBlah\BlahBlah.mdb] ON MyTable.XXXXX=MyOtherTable.YYYYY ...

    I can't pull the source where I did this same thing right now, but the IN may be problematic with regard to syntax (does it use square brackets? ...)
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •