Re: Current function within a Stored Procedure.
Posted in 1998
Would having another stored procedure which only updates the datetime help? You'd need two: one for start time and one for end time. At the beginning of your main proc, call update_starttime and at the end, call update_endtime. These are two separate procedures so I assume they won't be affected by Informix' synchronization issue. -- dbs -- David Samson, Senior Database Researcher dsamson@ndsisrael.com NDS Technologies Israel Ltd. +972 2-589-4529 PO Box 23012 Fax: +972 2-589-4578 Jerusalem, Israel Cellular: +972 51 287 481 Viegas, John <ViegasJP@panasonic.com> wrote in article <6m8ha7$ab7$1@news.xmission.com>... > > > > Here's a synopsis of the problem I'm trying to solve: > > I have a table (table_a) with two datetime columns (start_time, > end_time). > > At the beginning of a stored procedure, I want to insert a row into > table_a setting start_time to the current datetime. The stored > procedure then executes a bunch of other statements that take up to > several hours to execute. At the end of the procedure, I want to update > table_a end_time to the current datetime (different than the start > datetime). Because the Informix 'current' function in a stored > procedure returns only one value, I'm having trouble registering the two > different times. > > Do you know of any work-arounds. > > Thanks for your help. > > Pete >