Re: Stored Procs & CURRENT
Posted in 1997
wardr@gusco.com (Rick Ward) wrote: :I have a user who is running a stored procedure which takes several hours to update (which is :OK). The last statement that is executed in the stored procedure is an: :INSERT INTO table VALUES (...,CURRENT,...); :The value in the column inserted for CURRENT (which is a datetime field) is set to the datetime :the EXECUTE PROCEDURE statement was executed, NOT the time the INSERT statement was executed :some 6 hours later. :This "feature" is documented in the SQL SYNTAX manual, and explains that the CURRENT value is :calculated when the EXECUTE PROCEDURE statement is started. What it doesn't say is whether or :not there is a workround. :The question I would like to pose is: :Does anyone know of a workround such that this can be kept in the same stored procedure ? :We are running on Online DSA 7.14. I don't *know* of a workaround, but may be it will work if you call another stored procedure that returns it's value of current and use that to insert into the table? I haven't ever tried this. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org