Re: "decode" the boolean value retruned from a stored function

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1996/11/19
Message-ID: <56sbva$6n9_at_newton.pacific.net.sg>#1/1


vahidt_at_ibm530.vitek.com (Vahidt A. Tadjkarimi) wrote:
>I am trying to use the "decode" fuction to interpreat a returned
>bololean value from a store function to a char, but not much luck!
>Here is the example:
>
>create or replace function PLUS_MINUS_BO (VAL1 in number, VAL2 in
>number) return boolean
>is
>begin
> retrun ((abs(val1 - val2)/val1) > .2);
>end PLUS_MINUS_BO;
>/
>
>Now, when I execute the following "select":
>
>sql> select decode(PLUS_MINUS_BO(2,3), TRUE, '+', '-') from dual;
>
>
>I get:
>
>ERROR at line 1:
>ORA-00904: invalide column name
>
>Any hints?!
>

Try issuing TRUE with a single quote.

Regards

N.Prabhakar Received on Tue Nov 19 1996 - 00:00:00 CET

Original text of this message