Results 1 to 5 of 5
  1. #1
    usertest is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2023
    Posts
    35

    Question Copy data from SQL to local Access Table

    Hi,
    Below are the requirements:

    I would like to copy the data from my SQL tables to local access tables. (10000 records or so)

    I CANNOT link the tables so that option rules out
    I tried to create a pass through query with my ODBC connection (select ID,NAME from sqltable)
    But then which is the fastest way to copy the data?

    Is using the recordset the only option for me as I cant link the tables?

    Can someone provide a query/template that I can work on?



    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    If you can make pass-through query work, use the PTQ as source for an INSERT INTO SELECT or SELECT INTO action.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    usertest is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2023
    Posts
    35
    OK so what I understand is, in the PTQ, use the below query to add the data, right?

    Code:
    select * into localTable from dbo_serverTable
    


    Quote Originally Posted by June7 View Post
    If you can make pass-through query work, use the PTQ as source for an INSERT INTO SELECT or SELECT INTO action.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not in the PTQ. The PTQ would just be a SELECT to pull data. Then, an Access query refers to the PTQ as source just as it would any table or query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    usertest is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2023
    Posts
    35
    That worked. Thanks!

    Quote Originally Posted by June7 View Post
    Not in the PTQ. The PTQ would just be a SELECT to pull data. Then, an Access query refers to the PTQ as source just as it would any table or query.

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

Similar Threads

  1. Replies: 9
    Last Post: 11-02-2019, 02:17 AM
  2. Replies: 18
    Last Post: 08-09-2018, 06:45 AM
  3. Replies: 2
    Last Post: 03-30-2018, 11:33 AM
  4. How to Create local copy of linked Table
    By behnam in forum Programming
    Replies: 3
    Last Post: 11-20-2014, 05:49 PM
  5. Inserting Data to Access Table (Local) from MySQL table (Net)
    By gambit1430 in forum Import/Export Data
    Replies: 2
    Last Post: 09-26-2014, 01:34 AM

Tags for this Thread

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