Subject | RE: [firebird-support] Re: whats the opposite of first? |
---|---|
Author | Nigel Weeks |
Post date | 2006-10-18T02:58:05Z |
Looks a bit like a subselect. I'll have a tinker.
N.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]On Behalf Of Adam
Sent: Wednesday, 18 October 2006 12:40 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: whats the opposite of first?
view only available to the current query.
1. Write a query.
2. Put brackets around it.
3. Use it in your other query just like any other table of view.
In my example for the OP I used a stored procedure because it is
available in FB 1.5 and derived tables are not. I believe it would be
possible to do it under FB 2, something like:
select id
from (select first 5 id from mytable order by 1 desc)
order by 1 desc
Untested and probably OT and for this list ;(
Adam
[Non-text portions of this message have been removed]
N.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]On Behalf Of Adam
Sent: Wednesday, 18 October 2006 12:40 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: whats the opposite of first?
> Any chance of a quick tutorial on using them?It is just a query pretending to be a table; a bit like a temporary
view only available to the current query.
1. Write a query.
2. Put brackets around it.
3. Use it in your other query just like any other table of view.
In my example for the OP I used a stored procedure because it is
available in FB 1.5 and derived tables are not. I believe it would be
possible to do it under FB 2, something like:
select id
from (select first 5 id from mytable order by 1 desc)
order by 1 desc
Untested and probably OT and for this list ;(
Adam
[Non-text portions of this message have been removed]