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: Function and Datatype Question

Re: Function and Datatype Question

From: Pauli Salmu <pauli.salmu_at_pp.kolumbus.fi>
Date: 1997/02/04
Message-ID: <32F6986E.251C@pp.kolumbus.fi>#1/1

Tim Romano wrote:
> I'm trying to create a function and use it in a SELECT statement. However,
> the function returns a Boolean

 <snip>
> SELECT ID, ISNULL(DESC) FROM MYTABLE
>
> I get an error that the expression is the wrong datatype. If I change the
> BOOLEAN to VARCHAR2 and set bResult to 'Y' or 'N' accordingly, the function
> works.
>
> Is there something obvious that I'm doing wrong?
> Thanks,
> Tim

Boolean is a valid datatype in PL/SQL but not in SQL, so functions that return boolean can't be used in SQL statements. Received on Tue Feb 04 1997 - 00:00:00 CST

Original text of this message

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