Hi,
When I run my below HQL, I got an HibernateQueryException.
Code:
FROM Appointment ORDER BY CAST(CONVERT(VARCHAR(10), ExtractionDateTime, 111) AS DATETIME) DESC, AppointmentDateTime ASC
Detail exception message is;
Code:
org.springframework.orm.hibernate3.HibernateQueryException: cast() requires two arguments [FROM com.poc.model.Appointment ORDER BY CAST(CONVERT(VARCHAR(10), ExtractionDateTime, 111) AS DATETIME) DESC, AppointmentDateTime ASC];
I can run the above cast-convert SQL-string in MS-SQL.
How can I write to work out in HQL.
Thanks,