Subject | RE: [firebird-support] Re: whats the opposite of first? |
---|---|
Author | ibrahim bulut |
Post date | 2006-10-18T09:43:31Z |
Can i do with firebird 1,5,2
select id
from (select first 5 id from mytable order by 1 desc)
order by 1 desc
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Adam
Sent: Wednesday, October 18, 2006 4:40 AM
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
__________ NOD32 1.1808 (20061017) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
[Non-text portions of this message have been removed]
select id
from (select first 5 id from mytable order by 1 desc)
order by 1 desc
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Adam
Sent: Wednesday, October 18, 2006 4:40 AM
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
__________ NOD32 1.1808 (20061017) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
[Non-text portions of this message have been removed]