-->
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: comparing a string with an int in hql queries?
PostPosted: Mon Apr 25, 2005 2:49 am 
Newbie

Joined: Mon Apr 25, 2005 2:45 am
Posts: 1
Hi all,

I have a values (01,02,03,04,05 etc) stored in the db as strings. i am forced to store them as strings because of a few constraints in the framework I am using. is there a way to compare these values which are stored as strings in the db to integers in hql queries?

like...

select from abc where '01' > :1 where :1 os an integer?
thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 10:32 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Try it ?

I think that it work if your database support type conversion (oracle do it)

regards


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.