Results 1 to 4 of 4
  1. #1
    lbrady is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    1

    Truncating SQL Server table from Access

    Hi,
    I'm not an Access person, so I apologize for my ignorance.

    I have a customer who is using MS Access to import data into SQL Server. He is first deleting all the data from the SQL Server table. It is this delete that is taking an unacceptable amount of time. I told him (being a SQL Server person) that TRUNCATE is much faster and more efficient than DELETE, since the end result is to clear the table completely.

    Is there a way to perform a TRUNCATE against a SQL Server table linked table in Access??

    Or is there a more efficient way to remove the SQL data?



    If this is not the appropriate forum for this, please let me know and I will move it as directed.

    TIA!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Never heard of TRUNCATE. Delete then rebuild the table? But I doubt could do that either from the Access side. Sorry.
    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
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    This is a SQL problem not an Access problem. If he's importing data you give him he should be using the DROP TABLE, CREATE TABLE procedures in SQL. If the table you're supplying is large every time you delete a record or add or modify a record an accompanying record is created in a SQL log file and if your customer has not set an upper bound to the log file it will get huge very quickly and can really cause some problems. With the DROP TABLE the table is deleted and none of these individual records are generated.

    If he creates an SSIS job to drop and create the table he can schedule the job through SQL to run on a specific day or time or he can manually kick it off.

  4. #4
    Tim van Steenbergen is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    3

    Yes, can be done


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

Similar Threads

  1. Replies: 4
    Last Post: 09-06-2011, 08:03 PM
  2. Union query truncating a memo field
    By jpkeller55 in forum Queries
    Replies: 7
    Last Post: 05-27-2011, 02:17 PM
  3. Replies: 1
    Last Post: 01-22-2011, 12:23 PM
  4. link sql server table to access
    By broken_ice in forum Access
    Replies: 0
    Last Post: 06-28-2010, 12:50 PM
  5. HELP!!! - Importing table decimal field truncating
    By Valeda in forum Import/Export Data
    Replies: 0
    Last Post: 12-05-2006, 04:06 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