On Wed, Jun 20, 2007 at 10:42:21AM -0500, Jim Steil wrote: > SELECT * FROM contact WHERE contactId IN (SELECT contactId FROM > contactCategory WHERE categoryId IN (1,3))
from sqlobject.sqlbuilder import IN, Select Contact.select(IN(Contact.q.contactId, Select([ContactCategory.q.contactId], IN(ContactCategory.q.categoryId, [1,3])))) PS. Yes, SQLBuilder can distinguish these two IN()s automagically. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss