Subject | RE: [firebird-support] Select last n rows |
---|---|
Author | Svend Meyland Nicolaisen |
Post date | 2005-04-27T08:34:05Z |
Why can't you just sort descending and then insert the degrees in the front
of the string instead of appending them?
/Svend
of the string instead of appending them?
/Svend
> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of guru
> Sent: 21. april 2005 20:10
> To: Firebird Support
> Subject: [firebird-support] Select last n rows
>
>
> Hi,
>
> I'm trying to get last n rows from the query. It looks like
>
> select degree, degree_type
> from ga_degree
> where degree is not NULL
> order by entry_date
>
> Lets say we have 100 rows in a table. All have different
> "entry_date".
> I want to get "last n rows" from ga_degree.
> Can not change order by clause because;
> the result of a sp ( yes this is a sp ) is a string and that is :
> '0056730236'. ( something like that )
> Every digit represents a "degree" which was retrieved from guery.
> Most left is smaller date's degree. And most right is the
> last degree entry..
> That why can't use "select first n ..... order by entry_date desc".
>
> Well, with my poor English, thats all I can tell :)
>
> Thanks for help...
>
>
>
> ---
> avast! Antivirus: Outbound message clean.
> Virus Database (VPS): 0516-6, 20.04.2005 Tested on:
> 21.04.2005 21:10:01 avast! - copyright (c) 1988-2005 ALWIL Software.
> http://www.avast.com
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>