[web2py] Write Inline query

45 views
Skip to first unread message

vijay....@agnicient.com

unread,
Dec 2, 2014, 6:06:42 AM12/2/14
to web...@googlegroups.com

Hi All,

I really need help with a query?

this is my query:


Select * from Table1 where Column1 not in (Select Column2 from Table2);

How to write Query in Web2py DAL Sql From Grid

Niphlod

unread,
Dec 3, 2014, 7:06:05 AM12/3/14
to web...@googlegroups.com
not_in = db(db.table2.id>0)._select(db.table2.column2)


query
= db(~db.table1.column1.belongs(not_in)).select()

Ruslan Gareev

unread,
Jun 26, 2019, 11:08:54 PM6/26/19
to web2py-users
Hi. This should be in documentation. I have spent 20 minuts to find this :)

среда, 3 декабря 2014 г., 17:06:05 UTC+5 пользователь Niphlod написал:
Reply all
Reply to author
Forward
0 new messages