empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becker, Joel" <joel.bec...@essvote.com>
Subject join same table twice in a query
Date Mon, 11 Jun 2012 17:18:50 GMT
Hello. In a select query, how do I join the same table twice on two
different fields?

 

For example:

 

cmd.select(...);

cmd.join(db.PERSON.TRIP_ID, db.TRIP);

cmd.join(db.TRIP.START_CITY_ID, db.CITY.ID);

cmd.join(db.TRIP.END_CITY_ID, db.CITY.ID);

 

Then I want to get the start CITY.NAME and the end CITY.NAME.

-Joel

 


Mime
View raw message