Subject Re: [IBDI] Firebird 1
Author Ed Malloy
Peter,

What am I missing?

How do we know that the records are stored in a certain order?? AFAIK,
there is no guaranty in SQL that records are stored in any particular
order; indeed the way I learned, we should NOT trust anything like row
order.

If I want to access records in the order that they were entered, I just
access them via the Primary key -- which, on my tables is practically
always a synthetic variable designed to be nothing but a primary key and
that is numbered sequentially.

If I wanted .. 20 rows from ... somewhere. Once I establish where
somewhere is, I can ask for .... BETWEEN :thiskey and :nextkey (where
nextkey = thiskey + 19)

ed

Peter Morris wrote:
>
> > actually, wouldn't returning a rowid be a better option than first(x) or
> > whatever, that way the user can include the rowid in the where clause and
> do
> > whatever the hell they want selection wise? select * from blah where rowid
> > in (1,3,5,7,9)? I'd think this would be a better option than having it as
> an
> > aggregate style function.
>
> I agree 100%.
> TOP etc are very specific, next thing you know you will have PAGE, LAST, etc
> etc and that is not good.
> As long as the ROWID is the Rownumber of the current selection and is
> calculated at the end then this would be a brilliant idea.
>
> Pete
> ===
> http://www.HowToDoThings.com
>
> Community email addresses:
> Post message: IBDI@yahoogroups.com
> Subscribe: IBDI-subscribe@yahoogroups.com
> Unsubscribe: IBDI-unsubscribe@yahoogroups.com
> List owner: IBDI-owner@yahoogroups.com
>
> Shortcut URL to this page:
> http://www.yahoogroups.com/community/IBDI
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/