Subject | Re: [firebird-support] select first and skip |
---|---|
Author | Martijn Tonies |
Post date | 2012-05-16T12:49Z |
At least we all agree.
*g*
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
*g*
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
>> in a Table I'm looking for the right 5 records for each workplace on a
>> conveyor track (max-id of the records - offset for the workplace) but
>> ascending sorted.
>>
>>
>>
>> For example, the max ID is 200 (last record). The Offset is 10. If I
>> select
>> first 5 skip 10 fields from table order by id desc, then I get the IDs
>> 190,
>> 189, 188, 187, 186. But I need the records ascending! If I sort
>> ascending,
>> then I get the IDs 6, 7, 8, 9, 10. How can I get the last IDs in
>> ascending
>> order?
>
> select * from (
> select first 5 skip 10 fields from table order by id desc
> )
> order by ... asc
>
>
>
> --