Subject RE: [firebird-support] Dynamic SELECT FIRST?
Author Nigel Weeks
There must be more to this problem.

select first 10 skip 20 * from table where field = value order by field1, field2
is valid syntax.

If you're trying to do this inside a stored procedure, make sure you're
expecting multiple returned rows, otherwise you'll get a singleton select error.


cheers,
nw



> Hi
>
> I would do somethink like
>
>
>
> Select first :first skip :skip
>
> From table_name
>
> Order by mu_field
>
>
>
> Regards,
>
> Paul
>
>
>
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of Luis Semedo Duarte
> Sent: Tuesday, May 19, 2009 02:03
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Dynamic SELECT FIRST?
>
>
>
>
>
>
>
>
> Hello all!
>
> I have a big table (over 50K rcords) that i have to load to the application
> interface (a grid).
>
> Has you can see this number of records will ruin the application
> performance.
>
> Is there any way of using a parameter on the SELECT FIRST clause. For
> example the sp that returns the records could have a parameter for the
> number of records to be returned. Something like this:
>
> SELECT FIRST :number_of_record
> *
> FROM
> table
>
> I have tried this but i had no luck so far. The only way i found to do this
> is to use the parameter has a counter on loop that returns the records!
>
> Any thoughts about this?
> Thanks in advance!
>
> Luis Semedo Duarte
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>


--
Nigel Weeks

Prism9 Technology
e: nweeks@...
m: 0408 133 738
w:http://prism9.com

fb:http://facebook.com/profile.php?id=604592926