db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hainlin <dhain...@comcast.net>
Subject Re: Using Upper and Lower functions in Criteria
Date Fri, 19 Dec 2003 13:35:58 GMT
Ramah,
Try something on the order or (in employee_peer)
Criteria crit = new Criteria();
...
crit.add(ENAME, (Object) ("UPPER(" + ENAME + ") = '" + name.trim() + 
"'"), Criteria.CUSTOM);
...
List vals = doSelect(crit);

There may be other ways too but this technique  will work for lots of 
SQL situations (like date ranges, for example).
HTH
David

Ramah wrote:

> Is there any possibility to use UPPER and LOWER function of SQL in 
> Criteria?
>
> *Ex: Select eid from employee where upper(ename)='XYZ'.
> How to create Criteria for the above Query?*
>
> Thanks in Advance,
> Ramah
>




---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message