Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: can't invoke function (PL/SQL)

Re: can't invoke function (PL/SQL)

From: doid <doid_at_usa.net>
Date: 1997/04/07
Message-ID: <3349167E.72E3@usa.net>#1/1

Since my site isn't using the latest versions of Oracle or PL/SQL, there is a chance that this answer doesn't apply to later releases.

It looks to me as though the only problem is with the way that you're using your function.

You can't reference your own stored functions in a SELECT command. The first time I ran into this I thought it was a silly restriction. Maybe OracleCo has fixed this by now.

I think can only call your stored functions by using PL/SQL, like this:

        c := IsNumeric('1');

Hope this helped.

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?
 

-- 
The views expressed here are mine and do not reflect the official
position of my
employer or the organization through which the Internet was accessed.
Received on Mon Apr 07 1997 - 00:00:00 CDT

Original text of this message

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