db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: Difference between two timestamp fields
Date Wed, 06 Jun 2007 15:58:58 GMT
Dmitri Pissarenko wrote:
> Hello!
>
>> > SELECT APP.MyTable.startTime, {fn TIMESTAMPDIFF(SQL_TSI_FRAC_SECOND,
>> > APP.MyTable.startTime, APP.MyTable.endTime)}
>> > FROM APP.MyTable
>> > WHERE APP.MyTable IS NOT NULL
>> Should this be
>> WHERE APP.MyTable.startTime IS NOT NULL
>> ?
>
> Thanks for the hint!
>
> Now I'm getting this exception:
>
> SQL State = 22003 SQL Code = 30000 SQL Message = The resulting value
> is outside the range for the data type INTEGER. Exception message =
> java.sql.SQLDataException: The resulting value is outside the range
> for the data type INTEGER.
>
>> What version are you using?
>
> I'm using the version, which is delivered together with Java.

hmm... Looks like https://issues.apache.org/jira/browse/DERBY-2386
Fixed in 10.3 which is our upcoming release.   Even though the change 
has a very slight chance of affecting existing applications, I think it 
would be safe to port to the 10.2 branch, since the function is not so 
useful without the change.  Let us know on derby-dev if you need help 
doing that.

Kathey





Mime
View raw message