On Tue, Apr 24, 2007 at 01:01:18AM -0300, Jorge Godoy wrote: > # INSubquery comes from sqlbuilder > if amostras_ids: > resultados = model.VAuditoriaResultado.select(INSubquery( > model.VAuditoriaResultado.q.amostraID, amostras_ids))
INSubquery() is intended to be used internally for subqueries: INSubquery(model.VAuditoriaResultado.q.amostraID, Select(["id"], "table", ...)) Try to use IN(): resultados = model.VAuditoriaResultado.select(IN( model.VAuditoriaResultado.q.amostraID, amostras_ids)) When I have said "intended to be used internally" I meant IN() is clever enough to distinguish this from IN(model.VAuditoriaResultado.q.amostraID, Select(["id"], "table", ...)) IN() in this case is automatically replaced by INSubquery(), you don't need to call it manually. 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