dbTalk Databases Forums  

Re: Converting MS Access SQL Top N Query To Equivalent Oracle SQL

comp.databases.oracle.server comp.databases.oracle.server


Discuss Re: Converting MS Access SQL Top N Query To Equivalent Oracle SQL in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
joel garry
 
Posts: n/a

Default Re: Converting MS Access SQL Top N Query To Equivalent Oracle SQL - 09-10-2010 , 11:16 AM






On Sep 10, 8:46*am, "takv... (AT) gmail (DOT) com" <takv... (AT) gmail (DOT) com> wrote:
Quote:
http://www.progneer.com/wp/informati...?search_fd0=13....
The FAQ has a much better answer. Sorry if analytics are too much
rocket science for you. http://asktom.oracle.com/pls/apex/f?...10034624597 2
and http://asktom.oracle.com/pls/asktom/...D:948366252775
are even better answers, they show how to do things with rownum and
what ordering is really happening, or not happening.

Top ten of what, anyways? That is a stupid example. Top ten must
include some kind of ordering as well as some determination of what is
being ordered. If you depend on rownum, you may get different answers
at different times. rownum is a pseudocolumn, so without ordering,
you can get different results at different times with the same data.
That is just so stupid, you obviously don't know the most basic
relational theory or anything specific about Oracle. Rownum is
evaluated after the data is selected from the db but before the order
by statement is applied, so in a multiuser system with mvcc the data
can be returned in a different order depending on whether Oracle finds
it in an SGA buffer, gets it from disk, or has to rebuild it from
undo, or some other more obscure things.

Oracle is not Access, and even in this degenerate and incomplete
example does not translate directly.

Since you don't seem to get it, I'll yell: SQL IS NOT A PROCEDURAL
LANGUAGE.

Select * is bad programming practice, too.

jg
--
@home.com is bogus.
Ever wonder where "flash crowd" came from? http://www.asimovs.com/201008/ref.shtml

Reply With Quote
  #2  
Old   
takveen@gmail.com
 
Posts: n/a

Default Re: Converting MS Access SQL Top N Query To Equivalent Oracle SQL - 09-10-2010 , 11:52 AM






On Sep 10, 12:16*pm, joel garry <joel-ga... (AT) home (DOT) com> wrote:
Quote:
On Sep 10, 8:46*am, "takv... (AT) gmail (DOT) com" <takv... (AT) gmail (DOT) com> wrote:

http://www.progneer.com/wp/informati...?search_fd0=13....

The FAQ has a much better answer. *Sorry if analytics are too much
rocket science for you. *http://asktom.oracle.com/pls/apex/f?...UESTION_ID:113...
andhttp://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9...
are even better answers, they show how to do things with rownum and
what ordering is really happening, or not happening.

Top ten of what, anyways? *That is a stupid example. *Top ten must
include some kind of ordering as well as some determination of what is
being ordered. *If you depend on rownum, you may get different answers
at different times. *rownum is a pseudocolumn, so without ordering,
you can get different results at different times with the same data.
That is just so stupid, you obviously don't know the most basic
relational theory or anything specific about Oracle. *Rownum is
evaluated after the data is selected from the db but before the order
by statement is applied, so in a multiuser system with mvcc the data
can be returned in a different order depending on whether Oracle finds
it in an SGA buffer, gets it from disk, or has to rebuild it from
undo, or some other more obscure things.

Oracle is not Access, and even in this degenerate and incomplete
example does not translate directly.

Since you don't seem to get it, I'll yell: *SQL IS NOT A PROCEDURAL
LANGUAGE.

Select * is bad programming practice, too.

jg
--
@home.com is bogus.
Ever wonder where "flash crowd" came from? *http://www.asimovs.com/201008/ref.shtml
The link you referenced in your reply is wrong and deprecated. Here is
correct one:

http://www.progneer.com/wp/informati...rch_fd0=132497

Reply With Quote
  #3  
Old   
ddf
 
Posts: n/a

Default Re: Converting MS Access SQL Top N Query To Equivalent Oracle SQL - 09-12-2010 , 11:07 AM



On Sep 10, 12:52*pm, "takv... (AT) gmail (DOT) com" <takv... (AT) gmail (DOT) com> wrote:
Quote:
On Sep 10, 12:16*pm, joel garry <joel-ga... (AT) home (DOT) com> wrote:





On Sep 10, 8:46*am, "takv... (AT) gmail (DOT) com" <takv... (AT) gmail (DOT) com> wrote:

http://www.progneer.com/wp/informati...?search_fd0=13...

The FAQ has a much better answer. *Sorry if analytics are too much
rocket science for you. *http://asktom.oracle.com/pls/apex/f?...UESTION_ID:113...
andhttp://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9...
are even better answers, they show how to do things with rownum and
what ordering is really happening, or not happening.

Top ten of what, anyways? *That is a stupid example. *Top ten must
include some kind of ordering as well as some determination of what is
being ordered. *If you depend on rownum, you may get different answers
at different times. *rownum is a pseudocolumn, so without ordering,
you can get different results at different times with the same data.
That is just so stupid, you obviously don't know the most basic
relational theory or anything specific about Oracle. *Rownum is
evaluated after the data is selected from the db but before the order
by statement is applied, so in a multiuser system with mvcc the data
can be returned in a different order depending on whether Oracle finds
it in an SGA buffer, gets it from disk, or has to rebuild it from
undo, or some other more obscure things.

Oracle is not Access, and even in this degenerate and incomplete
example does not translate directly.

Since you don't seem to get it, I'll yell: *SQL IS NOT A PROCEDURAL
LANGUAGE.

Select * is bad programming practice, too.

jg
--
@home.com is bogus.
Ever wonder where "flash crowd" came from? *http://www.asimovs.com/201008/ref.shtml

The link you referenced in your reply is wrong and deprecated. Here is
correct one:

http://www.progneer.com/wp/informati...ch_fd0=13....- Hide quoted text -

- Show quoted text -
Funny, the referenced link in Joel's reply is the link YOU provided in
your original SPAM. You're posting deprecated links to your own
material???



David Fitzjarrell

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.