Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Function and Datatype Question
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
![]() |
![]() |