should help: sql_str = db()._select(db.tbl2.id) #note underscore before `select` db(~db.tbl1.id.belongs(sql_str)).select(db.tbl1.id, db.tbl1.name)
On Wednesday, May 15, 2019 at 1:06:49 AM UTC+3, Vlad wrote: > > What would be an equivalent of the following? > > SELECT ID, Name > FROM Table1 > WHERE ID NOT IN (SELECT ID FROM Table2) > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/e1e7ba43-70bd-4dc1-8029-21d0959cd023%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

