Hi Guo, can you send us the xml schema of your db? If you define correctly foreing keys, that query is just implemented. Otherwise you can use Critera:
Criteria c = new Criteria(); c.addJoin(Table1Peer.PUBLISHER_ID,Table2Peer.PUBLISHER_ID); List rows = BasePeer.doSelect(c); Regards, Luca -----Original Message----- From: Sheng Guo [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 9:03 PM To: [EMAIL PROTECTED] Subject: sql translation Hello, I am a new user of torque, and I would like to translate the following sql statement into torque, select c.name, u.firstname, u.lastname from sys_contact c, sys_contact_user u where u.sys_contact_id = c.id Could you please help me? yours sincerely Guo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]