locked
Run Multiple Insert queries in MS Access RRS feed

  • Question

  • User18303199 posted

    Hi all, My appologies if this is not a right place to ask this question as this is about MS Access independant of .Net.

     I need to run 100s of  insert queries in the query window to get the data.

    It is giving the below error if i run more than a query.

    "Characters found after end of
    >SQL statement."

    I used ; to seperate the queries but no change on the error.

    Can we run only one query at a time in MS Access?

    Plz help me.. 

    Tuesday, March 31, 2009 9:07 AM

Answers

  • User1707579862 posted

     Unfortunately, within Access you can only run a single Access query at a time.

    You either have to write a quick and dirty program to do it for you in ASP/ASP.NET or do the brute force method (insert all your statements into Excel, strip out everything except your values and copy and paste into Access)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 31, 2009 10:52 AM

All replies

  • User1707579862 posted

     Unfortunately, within Access you can only run a single Access query at a time.

    You either have to write a quick and dirty program to do it for you in ASP/ASP.NET or do the brute force method (insert all your statements into Excel, strip out everything except your values and copy and paste into Access)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 31, 2009 10:52 AM
  • User-1199946673 posted

    As you already experienced, Access doesn't support batched SQL statements. You can only run one query at a time. If you're using Access in a web environment, maybe you should consider to use Database Administrator for MS Access

    It offers the possibility to enter multiple queries seperated by a ';' and execute them. It also gives the possibility to run them all in 1 transaction.

    Wednesday, April 1, 2009 7:41 AM