-->
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.  [ 1 post ] 
Author Message
 Post subject: HQL integer division
PostPosted: Fri Sep 29, 2006 1:35 am 
Newbie

Joined: Mon Aug 07, 2006 7:14 pm
Posts: 16
[b]Hibernate version:3.1[/b]
[b]Name and version of the database you are using: MySQL 5.0.18[/b]

Hello all.
I'm executing a HQL query wich divides two integers and I want to obtain a double result, just like SQL does, but I see that HQL is doing an integer division (like java).
I try with 'cast (property as double)' but the cast to double doesn't work, casts to char, integer, string work fine, but not for double!

Anybody know if there is some way to obtain a double from a division between integers in HQL?, or cast to double?

Thanks to all.


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

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.