Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Order by queries against INSERT statements from procedures

Re: Order by queries against INSERT statements from procedures

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Fri, 10 Dec 2004 09:45:02 -0500
Message-ID: <149-2140513656.20041210094502@gennick.com>


Friday, December 10, 2004, 6:31:51 AM, Jose Manuel Quesada (jose.manuelquesada_at_gmail.com) wrote:

JMQ> 2.- If I have the INSERT statement within a procedure, each time I run
JMQ> the procedure, the "order by" query may return a different sequence of
JMQ> ordered rows sharing the same DATE_OPER, DATE_FIFO values.

JMQ> Any idea about this behaviour?

Is there some third column you wish to sort on? Otherwise, there's no reason not to expect results like:

DATE_OPER DATE_FIFO SOME_OTHER_COLUMN
11/1/01 11/1/01 A
11/1/01 11/1/01 B

one time, and results such as:

DATE_OPER DATE_FIFO SOME_OTHER_COLUMN
11/1/01 11/1/01 B
11/1/01 11/1/01 A

another time.

Don't look for consistency in row order beyond that which you specify in your ORDER BY clause.

Best regards,

Jonathan Gennick --- Brighten the corner where you are http://Gennick.com * 906.387.1698 * mailto:jonathan@gennick.com

Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://five.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Dec 10 2004 - 08:45:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US