#1269 "incompatible data types in combination" with TRUNC function

current-release
closed-fixed
1
2013-12-30
2012-11-09
Stefano
No

HSQLDB version 2.2.9
JAVA version 1.6.0_30

Executing prepared statement including TRUNC function with timestamp parameter, HsqlException with "incompatible data types in combination" message is thown.

For example, this prepared statement doesn't work: SELECT COUNT(ID) AS TOTAL_ROWS FROM TABLE1 WHERE OPERATION_DATE = TRUNC(?)
Instead this prepared statement works: SELECT COUNT(ID) AS TOTAL_ROWS FROM TABLE1 WHERE OPERATION_DATE = TRUNC(TIMESTAMP'2012-11-01 01:00:00')

In attach junit test for both cases.

Discussion

  • Stefano

    Stefano - 2012-11-09

    JUnit4 test cases

     
  • Fred Toussi

    Fred Toussi - 2012-11-18
    • priority: 5 --> 1
    • assigned_to: nobody --> fredt
    • status: open --> open-fixed
     
  • Fred Toussi

    Fred Toussi - 2012-11-18

    Thanks.

    Fixed and committed. Latest snapshot jar is now available with the fix.

     
  • Fred Toussi

    Fred Toussi - 2013-12-30
    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks