Re: Can't call Stored Function

From: Lun Wing San (Oracle) <"Lun>
Date: 1996/12/15
Message-ID: <32B4427A.4D83_at_qrcsun.qrc.org>#1/1


J. Sultan wrote:
>
> So here is the next problem I ran into while working with a Oracle 7 DB:
> I've created a Stored Function to insert data into some tables.
> But when I try to execute this function which returns an integer:
> SELECT Funcname(a,b,c,d) Result FROM Dual
>
> Oracle tells me "Wrong Datatype"
> When I change the function into a stored procedure evrything works fine.
> What am I doing wrong?

  There are several restrictions in using the user-defined function within your SQL statement. Please check:

  1. The stored function cannot take the whole column of data for processing. It must process row by row.
  2. The return datatype must be Oracle internal datatype, not the datatype of PL/SQL.
  3. The parameter mode must be IN.
  4. The parameter datatype must be Oracle inernal datatype, not the datatype of PL/SQL.
  5. It cannot involve the INSERT, UPDATE or DELETE inside the function.
  6. It cannot read or modify the package variables remotely or in parallel.
---
Name   : Lun Wing San
Title  : Oracle Application Developer of Hong Kong Productivity Council
         Oracle Database Administrator and System Administrator of QRC
Phone  : (852)27885841
Received on Sun Dec 15 1996 - 00:00:00 CET

Original text of this message