Re: 2 times same query, once with limits

From: Erwin Moller (since_humans_read_this_I_am_spammed_too_much_at_spamyourself.com)
Date: 01/21/05


Date: Fri, 21 Jan 2005 17:45:29 +0100

Bob Bedford wrote:

> I've a query quite important to execute.
>
> I've to fill an array with all result, so the query is called once wich
> returns all ID's
>
> Then I call the same query a second time as I shown only 10 results in my
> page.
>
> How can I avoid to call the query twice ?
>
> Bob

Hi Bob,

you didn't mention if you want to use both results on the same page.
If so:
- Loop over ALL the results once.
- Then loop over the first 10

If you want the results to be available on another page, store them in a
session.

Regards,
Erwin Moller



Relevant Pages

  • Re: Refining query
    ... Have you ever heard the joke about Bob ... so...if I were to create a DISTINCT query of "qryBigSet" on fields ...
    (microsoft.public.access.queries)
  • Re: All hail Bob (not)!
    ... casual user to get a correct result for a simple query, you only confirm that you are an embecile. ... Much more curiously though your resort to bombastic posts (whilst a feeble trait IMO for anyone professing intellectual tendencies) seems to have recent CDTzens in thrall given the deafening silence to date. ... What is it with Bob though? ...
    (comp.databases.theory)
  • RE: Summing Fields
    ... query for the order details that match the order shown on the main form. ... shown on the subform. ... "Bob Love" wrote: ... I use a query to find all details that match the order # in the main form. ...
    (microsoft.public.access.gettingstarted)
  • Re: Manipulation of strings query
    ... > I have received the data in an excel spreadsheet which contains the ... The query then returns the names ... So modify the query so it returns the names in separate columns ... ... Bob Barrows ...
    (microsoft.public.inetserver.asp.general)
  • Re: 2nd try, left join
    ... Thank Bob. ... and it seems to loop forever and return results in the millions when the highest result doing the query on Pet column at a time is less then 15000. ... >> You're going to need to provide some sample data and desired results ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)