db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dandamudi sudhakar" <dandamudisudha...@hotmail.com>
Subject RE: db2 and criteria
Date Tue, 08 Jul 2003 14:11:26 GMT
thanks Tom,
It worked.



Sudhakar Dandamudi






----Original Message Follows----
From: "Keeney, Thomas" <KeeneyT@SEC.GOV>
Reply-To: "Turbine Torque Users List" <torque-user@db.apache.org>
To: "'Turbine Torque Users List'" <torque-user@db.apache.org>
Subject: RE: db2 and criteria
Date: Mon, 7 Jul 2003 15:11:01 -0400

Try something like this:

Criteria crit = new Criteria();
crit.addJoin(RULE_APP_MAPPeer.RULE_SEQ, RULEPeer.RULE_SEQ);
crit.addAscendingOrderBy(RULEPeer.RULE_GROUP_ID);
crit.add(RULE_APP_MAPPeer.APP_SEQ, 1000);
Criteria.Criterion a = crit.getNewCriterion(RULEPeer.RULE_NAME, '%Ano%',
Criteria.LIKE);
Criteria.Criterion b = crit.getNewCriterion(RULEPeer.RULE_ID, '%101',
Criteria.LIKE);
crit(a.or(b));

Tom




-----Original Message-----
From: dandamudi sudhakar [mailto:dandamudisudhakar@hotmail.com]
Sent: Monday, July 07, 2003 1:51 PM
To: torque-user@db.apache.org
Subject: db2 and criteria



Hi
I need a query something like the one following using crietria obj.

SELECT RULE.RULE_SEQ, RULE.RULE_ID, RULE.RULE_NAME, RULE.RULE_DESC,
RULE.TERMS_USED, RULE.FACTS_USED, RULE.RULE_GROUP_ID, RULE.STATUS_ID,
RULE.USER_ID_CREATED, RULE.DATE_CREATED, RULE.USER_ID_UPDATED,
RULE.DATE_UPDATED, RULE.RULE_GROUP_SEQ, UPPER(RULE.RULE_GROUP_ID) FROM RULE,

RULE_APP_MAP
WHERE RULE_APP_MAP.APP_SEQ=1000
AND (RULE.RULE_NAME LIKE '%Ano%'
OR RULE.RULE_ID LIKE '%101%' )
AND RULE_APP_MAP.RULE_SEQ=RULE.RULE_SEQ
ORDER BY UPPER(RULE.RULE_GROUP_ID) ASC

I am not getting any idea how to do that.
Can any body help me

Thanks
Sudhakar Dandamudi

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail


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

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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