Archives of the TeradataForum
Message Posted: Thu, 23 Apr 2015 @ 20:43:43 GMT
Subj: | | Re: Subtracting two TIMESTAMP |
|
From: | | Prescott, Kyle |
Overflow message depends on how the source timestamps are defined. I don't believe you can simply cast the timestamps or interval results to a
lesser precision than the definition of the source definitions.
With DBQL Log table: Starttime, FirstStepTime, FirstRespTime are all defined as TIMESTAMP(2). So...as you manipulate them you will need to at
least keep a precision of "2" for the sub-seconds.
firststeptime - starttime hour (4) to second(2) as ParseTime,
firstresptime - firststeptime hour(4) to second(2) as QueryExecTime,
firstresptime - starttime hour(4) to second(2) as QueryTotalTime
Kyle Prescott
DBA Manager
Unum-GHDS
Chattanooga, TN
|