Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get current time in stored procedure

Status
Not open for further replies.

byrdfarmer

Vendor
Apr 12, 2004
13
0
0
US
Hi all. Someone here noticed that if you 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.

Any suggestions?
 
you could do a system call which writes a log into a separate table

create procedure doit()
returning integer;

DEFINE cmd varchar(255);

LET cmd="insert into mytab values('`date` :I am here')";

SYSTEM 'echo "'||cmd||'" | dbaccess mydatabase';

RETURN 0;
end procedure;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top