Shishir wrote:
The sql
select TIMESTAMPDIFF(1,CHAR(TIMESTAMP('2001-09-29-11.25.42.483219') -
TIMESTAMP('2001-09-26-12.07.58.065497'))) from sysibm.sysdummy1
works in db2 8.1.2/RHEL 2.1
but gives the error
DB2 SQL error: SQLCODE: -443, SQLSTATE: 38552, SQLERRMC:
SYSFUN.TIMESTAMPDIFF;TIMESTAMPDIFF;SYSFUN:03
on db2 8.2/RHEL 3
Any pointers?
Regards
Shishir
Function TIMESTAMPDIFF returns an INTEGER (signed INTEGER) representing number
of units (units selected by value of first argument) in the Timestamp Duration
represented by second argument.
In your case first argument is 1 - which represents microseconds, second
argument is timestamp duration of 2231744.417722 seconds.
Convertion of this duration to microseconds and storing result into an INTEGER
is impossible.
Jan M. Nelken