-->
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: any suesion to use ignorecase and SQL in clause ?
PostPosted: Thu Jan 11, 2007 4:14 pm 
Newbie

Joined: Tue Jan 09, 2007 12:45 pm
Posts: 13
I have a requirement where the SQL should look like

Select * from EMPTABLE where UpperCase(EMP_NAME) in ('TOM','DICK',HARRY')


in this SQL :

I am trying to retrieve rows by converting the EMP_NAME column to uppercase ( or for that matter I can convert it to lowercase and put the condition in lower case ), and putting the 'in' clause ( a pool of values )

How do I do this in hibernate using criteria API:

EMPTABLE o;

1 Using Example

Example.create(o).IgnoreCase() - I cannot provide a pool of values


2 Using Expression
String[] s={'TOM','DICK','HARRY'};
Expression.in("EMP_NAME", s) - I cannot provide Case-insensitive


Any tips and tricks to this ?


Thanks


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.