dbTalk Databases Forums  

Rownum

comp.databases comp.databases


Discuss Rownum in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Picard
 
Posts: n/a

Default Re: Rownum - 01-09-2008 , 03:58 AM






Ed Prochak wrote:
Quote:
On Jan 4, 6:11 am, Andre Rothe <andre.ro... (AT) imise (DOT) uni-leipzig.de
wrote:
Hi,

Did anyone knows a database system which can execute the following query:

select *
from (select rownum t, a, b, c, d from datatable where c=1 order by a,b,c)
where t=15

In Oracle I get the 15th row of the subquery, but I cannot find another
system which has implemented the rownum functionality like Oracle.

Ideas?
Thanks a lot
Andre

ROWNUM is assigned BEFORE the ORDER BY. it is a kludge and IMHO an
abomination.

you are better off using the ranking functions as Lennart mentioned.
Ed
May I ask why do you regard ROWNUM a kludge?


Reply With Quote
  #12  
Old   
Picard
 
Posts: n/a

Default Re: Rownum - 01-09-2008 , 03:58 AM






Ed Prochak wrote:
Quote:
On Jan 4, 6:11 am, Andre Rothe <andre.ro... (AT) imise (DOT) uni-leipzig.de
wrote:
Hi,

Did anyone knows a database system which can execute the following query:

select *
from (select rownum t, a, b, c, d from datatable where c=1 order by a,b,c)
where t=15

In Oracle I get the 15th row of the subquery, but I cannot find another
system which has implemented the rownum functionality like Oracle.

Ideas?
Thanks a lot
Andre

ROWNUM is assigned BEFORE the ORDER BY. it is a kludge and IMHO an
abomination.

you are better off using the ranking functions as Lennart mentioned.
Ed
May I ask why do you regard ROWNUM a kludge?


Reply With Quote
  #13  
Old   
Picard
 
Posts: n/a

Default Re: Rownum - 01-09-2008 , 03:58 AM



Ed Prochak wrote:
Quote:
On Jan 4, 6:11 am, Andre Rothe <andre.ro... (AT) imise (DOT) uni-leipzig.de
wrote:
Hi,

Did anyone knows a database system which can execute the following query:

select *
from (select rownum t, a, b, c, d from datatable where c=1 order by a,b,c)
where t=15

In Oracle I get the 15th row of the subquery, but I cannot find another
system which has implemented the rownum functionality like Oracle.

Ideas?
Thanks a lot
Andre

ROWNUM is assigned BEFORE the ORDER BY. it is a kludge and IMHO an
abomination.

you are better off using the ranking functions as Lennart mentioned.
Ed
May I ask why do you regard ROWNUM a kludge?


Reply With Quote
  #14  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Rownum - 01-09-2008 , 04:19 PM



Picard <picard (AT) nospam (DOT) com> wrote:

[snip]

Quote:
May I ask why do you regard ROWNUM a kludge?
A database is a collection of propositions. The order is
irrelevant. Having
2+2=4
7-4=3
in that order or this one
7-4=3
2+2=4
makes no difference to the truth value. 2+2=4 is true regardless of
where it is stored.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #15  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Rownum - 01-09-2008 , 04:19 PM



Picard <picard (AT) nospam (DOT) com> wrote:

[snip]

Quote:
May I ask why do you regard ROWNUM a kludge?
A database is a collection of propositions. The order is
irrelevant. Having
2+2=4
7-4=3
in that order or this one
7-4=3
2+2=4
makes no difference to the truth value. 2+2=4 is true regardless of
where it is stored.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #16  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Rownum - 01-09-2008 , 04:19 PM



Picard <picard (AT) nospam (DOT) com> wrote:

[snip]

Quote:
May I ask why do you regard ROWNUM a kludge?
A database is a collection of propositions. The order is
irrelevant. Having
2+2=4
7-4=3
in that order or this one
7-4=3
2+2=4
makes no difference to the truth value. 2+2=4 is true regardless of
where it is stored.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.