db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramah" <ra...@gft.com>
Subject RE: Using Upper and Lower functions in Criteria
Date Sat, 20 Dec 2003 12:05:50 GMT
When I tried, 

criteria.getCriterion(YourPeerPeer.ENAME).setIgnoreCase(true);

The following exception occurs.


java.lang.NullPointerException
	at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:1066)
	at org.apache.torque.util.BasePeer.createQueryString(BasePeer.java:927)
	...

Thanks and Regards,
Ramah



-----Original Message-----
From: Scott Eade [mailto:seade@backstagetech.com.au]
Sent: Saturday, December 20, 2003 7:34 AM
To: Apache Torque Users List
Subject: Re: Using Upper and Lower functions in Criteria


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?*
>

try:

            criteria.getCriterion(YourPeerPeer.ENAME).setIgnoreCase(true);

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au





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





---------------------------------------------------------------------
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