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: ">" in select-Statement

Re: ">" in select-Statement

From: stupsnose <swetter_at_arcor.de>
Date: Thu, 21 Jul 2005 11:56:22 +0200
Message-ID: <42df7147$0$18006$9b4e6d93@newsread4.arcor-online.net>


Maxim Demenko schrieb:
> stupsnose schrieb:
>

>> Maxim Demenko schrieb:
>>
>>> stupsnose schrieb:
>>>
>>>> Hello!
>>>>
>>>> I wonder if i can use something like
>>>> SELECT DECODE(a>b,0,1) FROM dual;
>>>> to check if a is greater then b? Can someone help me please?
>>>>
>>>> Thank you!
>>>> Stefan
>>>
>>>
>>>
>>>
>>> The simpliest approach would be to code that with a CASE - you can 
>>> directly compare the values. If you must use decode however, it could 
>>> be:
>>>
>>> Best regards
>>>
>>> Maxim
>>
>>
>>
>> Hello!
>>
>> I tried the CASE-thing. It works for normal SELECTs. But i cannot get 
>> it to work with GROUP BY. If i use SELECT max(CASE... END "testit") 
>> FROM... i get an Oracle Error ORA-00907. Can yoyu help me with that?
>>
>> Thanks!
>> Stefan

>
>
> Please , remove that "testit" from your expression.
>
> Best regards
>
> Maxim

Hello!

It works. Thanks.
Stefan Received on Thu Jul 21 2005 - 04:56:22 CDT

Original text of this message

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