Re: Problem in using Stored Function in SQL statement
Date: 1997/04/15
Message-ID: <33536116.1763315_at_newshost>#1/1
SQL doesn't understand booleans, it only understands numbers, dates, and strings.
You can't call a function from SQL that returns a type that is exclusive to PL/SQL.
You will need to change is_status_active to return a database type..
On Tue, 15 Apr 1997 21:59:18 GMT, albertla_at_hkstar.com (Albert Lam) wrote:
>Hi, if anyone could help!
>
>I have this stored function on the server : IS_STATUS_ACTIVE()
>This function should return BOOLEAN result.
>
>What I want to do is to perform a SQL which selects only those
>record that have active status. I have the following SQL statement
>in another stored procedure :
>
> SELECT emp_num
> FROM employee
> WHERE IS_STATUS_ACTIVE(emp_status);
>
>PL/SQL just won't let me save the procedure saying that
>
>PLS-00425: in SQL, function argument and return types must be SQL
>type.
>
>
>Does anyone have any idea ?
>
>Thanks
>
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Apr 15 1997 - 00:00:00 CEST