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: Multiple column sorting with a decode

Re: Multiple column sorting with a decode

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 24 Nov 2005 12:29:30 -0700
Message-ID: <438622aa$1@news.victoria.tc.ca>


voidhack_at_gmail.com wrote:
: I see. But then I would have no reports.
: I asume that there is no way to sort on multiple columns using a decode
: in a single SQL query then ?

It is almost always wrong to assume there is "no way" to do something.

: Is there a reason why the string returned by the decode is not
: interpreted correctly as two consecutive column parameters ?

It is you who is interpreting the expression incorrectly.

The decode returns a value at run time, but the column numbers are part of the syntax of the expression which is determined during compilation.

Basically you are misunderstanding what it means for those strings to be "interpreted correctly".

Anyway, see my other answer for one possible solution. Received on Thu Nov 24 2005 - 13:29:30 CST

Original text of this message

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