Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Returning results in the order they were entered
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:20:34 CST