Jeff,
The finderr utility gives a very straight forward answer, here it is:
------------>8------------------------------8<-----------------
-675 Illegal SQL statement in stored procedure.
A restricted statement was executed in a procedure. This
occurs when a procedure is called from an SQL data
manipulation statement.
Example of error:
CREATE PROCEDURE testproc (arg INT, id INT)
RETURNING INT;
UPDATE tab SET col = arg WHERE key = id; --error
RETURN id;
END PROCEDURE;
SELECT col FROM tab WHERE testproc(tab.col,tab.key) = 10;
Correction: Do not use a restricted statement (like the
preceding UPDATE).
------------>8------------------------------8<-----------------
This holds good for even Insert and Delete irrespective of the table!
HTH
Mahesh G.
Motorola India Ltd.
Jeff Larsen wrote:
> Hi all,
>
> The Informix Error Messages book does not do
> a very good job of explaining error 675.
>
> It says that you can't call a stored procedure
> from a data manipulation statement if that
> procedure executes a "restricted" statement.
> There is no definition given of a "restricted
> statement";
>
> The example shows a procedure that is updating
> the very same table that is being manipulated
> by the SQL statement. This is clearly a problem.
>
> I have a procedure that updates a table that
> is in no way related to the table I am
> updating in my statement that calls the
> procedure.
>
> Does this mean I can't call a procedure that
> does ANY data manipulation. Why?
>
> Thanks for your help,
>
> Jeff Larsen
> larsen@qec.com