Truncate MS Access Table from Visual Studio using SQL code

  • I am building a Visual Sudio process that will Truncate and load data to an Access database (2010) from SQL Server (2012). I have one "Execute SQL Task" for one table (LungCancer_HF_Patients):

    "DELETE LungCancer_HF_Patients.* FROM LungCancer_HF_Patients;" that parses and works.

    I have another table (Report1):

    "DELETE Report1.* FROM Report1;"

    that does not parse with a message "The query failed to parse. Incorrect syntax near '*'."

    Can anyone tell me why the first one parses correctly and the other one does not?

    Any help is greatly appreciated.

    Thank you.

  • The only thing I can think of is that you have another object named "Report1" in the database. Otherwise it should work.

  • Thank you. I found the problem and there was a typo in the table name.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply