Hi,
i am calling the SP from bteq. This shouldn't matter much, as i am only interested in keeping different timestamps in the debug table for
sp calls that run linearly.
No UDFs have ever been written yet, and the DBAs are not really in favor of this, i can't explain why.
When the SP calls itself recursively based on if condition, the rows inserted in the debug table have same timestamp for two consecutive calls,
and therefore want to sleep for a fraction of second before the sp call.
Here's the pseudo-code:
sp_sample(INOUT io_retcd)
{
if (...) then
...
insert into debug table (current_timestamp,...);
else
call sp_sample(...)
insert into debug table (current_timestamp,...);
end if
}
Thanks,
-srinivas