Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    85

    Question Unanswered: run multiple sql statements

    Hello, a general question, if you have multiple sql statements is there a preferred way to run them, i.e if I have say, sql1, sql2, sql3 is a) or b) best

    a)
    run sql1
    run sql2
    run sql3
    or
    b)
    SQL= sql1 & sql2 & sql3
    run SQL

    Thanks

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You cannot run multiple sql statements in Access (you receive an error message stating that caracters were found after the end of the query).

    You can do it if you address a SQL server using a pass-through query, though. The problem is that it will me more complex to debug in case of problem and I cannot imagine any gain in doing so.

    Have a nice day!

  3. #3
    Join Date
    Apr 2009
    Posts
    85
    Thanks Sinndho, that answers my question

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    In other words, A) is your only choice.

    You cannot run multiple sql statements in Access
    Um... You mean you can't do it like B). It can be done with A).

    Just clarifying
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Apr 2009
    Posts
    85
    Thanks StarTrekker, I aways appreciate a response to a question, whether it's an answer or a clarification of an answer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •