Results 1 to 6 of 6
  1. #1
    nello87to is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    14

    Select data from another database

    Hi all,


    i have a problem selecting data from another database.

    SELECT FIELD1, FIELD2, FIELD3
    FROM TABLE1;


    TABLE1 is in another database called DB_Work_INP in the same folder.

    How can i select data from DB_Work_INP?
    Is possible not use a phisical path (eg C:\Users\nello\Desktop\DB_Work_v18\DB_Work_INP.acc db) but a logical path for the connection?
    I need to use these databases in different pc, so, if i use a phisical path they don't work.

    Thank you very much,
    Nello

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I do not understand the question. Are you trying to connect to a database that resides on a peer to peer network? As long as you are on the same subnet, you should be able to see shared folders.

    You can use VBA to maintain your linked tables.

  3. #3
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Did you first link the Table in to your database?

  4. #4
    nello87to is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    14
    Hi,
    I am not on a peer to peer network. I have one DB and i want divide it in two separate database.
    I want put these 2 databases in the same folder. One of this contains select statements of data in the other database.
    I have problems when i try to do join. I tried to do this, but it doesn't work:

    SELECT NPL.INTERNAL_ORG_RK, NPL.NSG, NP.COUNTERPARTY_RK, Herm.prima_p_intestaz
    FROM NPL IN 'DB_Work_INP.accdb'
    LEFT JOIN Herm IN 'DB_Work_INP.accdb'
    ON (NPL.CODICE_OPERAZIONE = Herm.cod_conto_rapp);

    I think there are some sintax errors

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    As mentioned by JoeM, you should connect to the DB prior to running the SQL. I do not believe there is an alternative to this.

  6. #6
    nello87to is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    14
    Thank you all, i've solved!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Exporting /Importing one select query to another database
    By nick243 in forum Import/Export Data
    Replies: 5
    Last Post: 08-15-2016, 01:58 PM
  2. Replies: 2
    Last Post: 08-11-2015, 12:46 PM
  3. Replies: 8
    Last Post: 08-20-2013, 10:47 AM
  4. Replies: 1
    Last Post: 08-06-2013, 08:05 PM
  5. Replies: 3
    Last Post: 05-15-2011, 10:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums