-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: HQL - SQL SERVER CONVERT function equivalent
PostPosted: Wed Dec 16, 2009 8:38 am 
Newbie

Joined: Tue Sep 15, 2009 3:36 am
Posts: 7
Location: London
Good Afternoon,

Is there a CONVERT type equivalent in standard HQL for formatting the decimal precision of Numbers (doing division in a HQL statement so what to restrict the precision in the Result set - not in the mapping)?

For instance in SQL (Server) I may do something like this to limit precision to 3 decimal places:

CONVERT(Decimal(15,3),A_TableOfSomeKind.EntryAmount)

Cheers

Mat


Top
 Profile  
 
 Post subject: Re: HQL - SQL SERVER CONVERT function equivalent
PostPosted: Wed Jun 06, 2012 3:42 am 
Newbie

Joined: Wed Jun 06, 2012 3:32 am
Posts: 1
I have a similar problem to translate CONVERT to hql. The parser tells me "No data type for node: org.hibernate.hql.ast.tree.MethodNode" with a select with a CONVERT(varchar, column, style) as attribute.

With Hibernate 3.2.2 and SQL Server 2005.

Thanks for any advice or ideas.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.