Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Torque criteria

Status
Not open for further replies.

sensory21

Programmer
Jan 27, 2004
79
GB
Hi

I need to have a new criteria to join two tables in different manner:

table item
==========
stageId
nextStageId


table stage
===========
stageId

the query has to match where stageId from item equals stageId from stage and nextStageId from item equals stageId from stage

can anybody help?

cheers
vero
 
Do you mean in SQL ?

SELECT * FROM item
WHERE item.stageId = stage.stageId
AND item.nextStageId = stage.nextStageId;



--------------------------------------------------
Free Database Connection Pooling Software
 
No, not in sql in Apache Torque like:

cr.addJoin(ItemPeer.ITEMTYPEID, ItemTypePeer.ITEMTYPEID);

any ideas?
Am i in the right forum?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top