Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    SQL within a procedure (2003 sp2)

    Is there any benefit to using a SQL statement in a procedure over just running a query, or is it just a matter of preference?
    Thanks
    chuck

  2. #2
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SQL within a procedure (2003 sp2)

    When Access stores queries, it optimises them using something called Rushmore optimisation. Basically, it works out the most efficient way to process the query and stores that 'plan'. If you create a query (SQL statement) in VBA then there is no optimisation associated with it. The difference will only be noticeable when large numbers of records being processed.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  3. #3
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: SQL within a procedure (2003 sp2)

    That's good to know. I appreciate that, Steve.
    Thanks
    chuck

Posting Permissions

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