current date/time in looping SP weirdness
Posted in 2004
Topics: General Discussion
Hi all. Noticed when I try to get the current time in a stored procedure, the routine only returns the time when that SP started...trying to add time stamps in different parts of an SP and running into this. This creates an issue with a looping SP we have that needs to resolve current time multiple times in the course of other work - it keeps pulling the same time! Kind of frustrating and I am sure theres a cludge, just wondering how I can do this? Any suggestions?
"byrdfarmer" <byrdfarmer@hotmail.com> wrote in message news:5e52df43.0405060420.52cc8b27@posting.google.com... > Hi all. Noticed when I try to get the current time in a stored > procedure, the routine only returns the time when that SP > started...trying to add time stamps in different parts of an SP and > running into this. This creates an issue with a looping SP we have > that needs to resolve current time multiple times in the course of > other work - it keeps pulling the same time! Kind of frustrating and I > am sure theres a cludge, just wondering how I can do this? This is expected. It is as per ANSI standard to return the same timestamp. Jonathan Leffler will explain it better. I believe there are workarounds for it. Check google archives on this subject.