Archives of the TeradataForum
Message Posted: Wed, 18 May 2005 @ 08:03:44 GMT
I'm trying to find a way to calculate the time difference. For example, in a stored procedure, I've defined as following.
DECLARE ctime = TIMESTAMP(6); SET ctime = CURRENT_TIMESTAMP; DELETE FROM table WHERE (INTERVAL '30' SECOND < ctime - c);
The definition for table is following. It's defined in the BTEQ file (Outside of stored procedure)
CREATE TABLE table( a INTEGER, c TIMESTAMP(6) );
As you can see, the purpose of DELETE clause is to delete the row which is more than 30 seconds old.
For some reason, I get a compile error in DELETE statement.
Please help me finding the solution.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|