| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: can't invoke function (PL/SQL)
Michael Agbaglo wrote:
>
> I compiled the function below in Oracle for Win95
>
> CREATE OR REPLACE FUNCTION IsNumeric( C IN CHAR ) RETURN BOOLEAN
> IS
> BEGIN
> RETURN ( C >= '0' AND C <= '9' );
> END;
>
> I verified it with ...
>
> SELECT object_type, object_name,status
> FROM user_objects
> WHERE object_type = 'FUNCTION'
>
> --> valid !
>
> I did a
>
> SELECT IsNumeric('p') FROM DUAL;
>
> and got an error: no such column ... or similar...
>
> WHY?
Because of the return type -- you cannot use a Boolean in SQL.
Ciao,
Finn
-- -------------------------------------------------------------------------------- Finn Ellebaek Nielsen Oracle Associated Senior Consultant Ellebaek Consulting E-mail: ellebuk_at_post3.tele.dk Niels Ebbesens Vej 9, 3. th. Mobile Phone: +45 20 32 49 25 DK-1911 Frederiksberg C Mobile Phone SMS: 20324925_at_sms.tdm.dk (Subject) Denmark Private Phone: +45 33 25 34 50 -------------------------------------------------------------------------------- "Life is a beach and then you dive" "Divers do it deeper"Received on Fri Apr 04 1997 - 00:00:00 CST
![]() |
![]() |