is it possible to cast the LONG type value that "COUNT(*)" returns to an INTEGER?
My query is along the lines of:
Code:
INSERT INTO EmployeeCount(date, employeeCount) SELECT :CURRENT_DATE, COUNT(*) from EmployeeTable
but I get the following exception:
Code:
java.lang.IllegalArgumentException: org.hibernate.QueryException: insertion type [org.hibernate.type.IntegerType@1144ba2] and selection type [org.hibernate.type.LongType@1719f30] at.....................
I tried CAST(COUNT(*) AS INTEGER) but I get this AST tree exception.
any suggestions?
Thanks guys,
M