Get the true current value from another SP! i.e.
let my_current=true_current()
...
INSERT INTO table VALUES (...,my_current, ...)
While I'm at it, please note that the OWS manual, Guide to SQL, Syntax, Vol 1,
on page 303 seems to imply that you cannot use SP variables within the
VALUES clause. This is obviously not true.
HTH,
Marco
____________________________________________________________________________
rem radioterapia, which I immeritately manage, seldom agrees with what I say
marco greco (Catania, Italy) Work:
marcog@ctonline.it rem radioterapia 39 95 447828 fax 446558
(was mar.greco@agora.stm.it) Achea 39 95 503117
--- On Tue, 07 Jan 1997 16:23:44 -0800 Rick Ward <wardr@gusco.com> 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.
Thanks in advance.
--
Rick Ward
Senior DBA
Great Universal Stores Home Shopping
MANCHESTER, UK
-----------------End of Original Message-----------------