-->
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: Equivalent of ISNUMERIC (from SQL Server) in HQL ?
PostPosted: Wed Oct 12, 2005 9:01 am 
What's the equivalent of ISNUMERIC (from SQL Server) in HQL?
I'm doing a query that is going to find the max integer value from a column that can contain both integer and non-integer values (column type is string).
I need to find the value which is when converted the highest integer value existing in my column/table.

In Sql Server I would write something like:

SELECT MAX( CONVERT(BigInt, RTRIM(c.CustomerNo)) ) FROM Customers c WHERE (ISNUMERIC(RTRIM(c.CustomerNo)) = 1)


Top
  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 2:01 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
I don't know if CONVERT() is supported by NHibernate (as it has more than one parameter); for ISNUMERIC(), you may try it in HQL; it shouldn't be changed when generating the SQL...

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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.