Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.05 (latest release)
Name and version of the database you are using: Ms Sql Server 2000
dialect:<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
The generated SQL (show_sql=true):None Available
I am trying to run the following HQL but am getting an error about the cast function:
select new com.pvr.util.CacheBean(lv.id,lv.ItemKey,lv.ItemDescription) from LookupValues lv
where lv.GroupName = ''NUMBERS'' and
cast(lv.ItemKey AS Integer) < 4
order by cast(lv.ItemKey AS Integer)
The error is not very descriptive:
ERROR [2005-06-09 10:00:49,594] *** ERROR: line 2:17: unexpected token: AS
I run a number of queries like this and they all work .. though none of the others are using the cast function.
I am guessing I have the wrong syntax in there but I cannot find
any info about the cast function in Hibernate.
Anyone have an idea?
Thanks.....