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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Returning results in the order they were entered

Re: Returning results in the order they were entered

From: mcstock <mcstockspamplug_at_spamdamenquery.com>
Date: Thu, 6 Nov 2003 17:52:43 -0500
Message-ID: <2eqdnUt3Xt5yTTeiRVn-iQ@comcast.com>


you're going to have to record the date entered and then sort on that

reason -- oracle can and will reorder the physical location of the rows (during normal operation and typical maintenance operations), so if you don't store a timestamp, so the order entered is not preserved

-- 
Mark C. Stock
email mcstock -> enquery(dot)com
www.enquery.com
(888) 512-2048


"Boffo Jinko" <test_at_yahoo.com> wrote in message
news:boehfl$1e08bm$1_at_ID-147295.news.uni-berlin.de...

> I have a query that returns the results of a basic select statement, like
> so:
>
> select distinct id,name from Caseflow.cases where number1 in
> (124125,124122,124130);
>
> When this query is returned, it returns the results in order from lowest
to
> highest. This is typically okay, but I need to have the results returned
in
> the order they were entered by the user. So in the above example, the
> results would have to be returned at 124125,124122,124130, not
> 124122,124125,124130 as they normally would be. Is there a way to do this,
> or am I going to have to resolve this problem in my web page code? There
are
> no other fields in common that I could sort by - it has to be by the
number
> entered in the IN clause, and they are often not in any kind of order. And
> no, telling the user to enter them differently isn't an option!
>
> Thank you,
> Scott
>
>
Received on Thu Nov 06 2003 - 16:52:43 CST

Original text of this message

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