Hi,
i'm new in Hibernate and currently i'm using Hibernate with SQL Server 2005. I have a query like this :
Code:
SELECT CONVERT(NVARCHAR(10), trDate, 111), product FROM detail GROUP BY CONVERT(NVARCHAR(10),trDate,111)
Once i call createSQLQuery of above query and i fetch a list, it always throw Exception. the exception is like this :
Code:
org.hibernate.exception.DataException: could not execute query
Caused by: java.sql.SQLException: The value supplied cannot be converted to DECIMAL.
and the log4j output :
Code:
Jun 19, 2009 1:35:55 PM org.hibernate.type.NullableType nullSafeGet
INFO: could not read column value from result set: ; The value supplied cannot be converted to DECIMAL.
Jun 19, 2009 1:35:55 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: 22000
Jun 19, 2009 1:35:55 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: The value supplied cannot be converted to DECIMAL.
Is there any problem with SQL Server 2005 integration? If i remove the CONVERT function, it works fine.. is there any clue? any help will be apreciated... thank you!