× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Joe.

Unfortunately, no.

The FETCH FIRST xx ROWS clause requires a literal value, it doesn't
work with variables.

If you must have a variable number of days, dynamic SQL would be your
only answer...

It should be noted that since I was using iNav's Run SQL Scripts, the
30ms benchmark was for a dynamic statement...

Also note that I tried 180 days also, it didn't effect the timing. I
actually was seeing ~15ms when issuing doing multiple tests in a row.

Charles

On Tue, Jul 12, 2011 at 5:34 PM, Joe Pluta <joepluta@xxxxxxxxxxxxxxxxx> wrote:
VERY slick, Charles.

Now I have to remember to keep the FETCH FIRST in my pocket when
selecting a limited number of records.  I assume also that the "6" can
be a variable, right?

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.