Help with creating a Select within the Web2Py DAL for a SQL query that uses an 'exists' clause

17 views
Skip to first unread message

George D Elig

unread,
Apr 21, 2017, 11:17:53 AM4/21/17
to web2py-users
I have a simple SQL query that pulls a column value from a secondary table, based on a ID being equal in both tables. The query uses an exists clause on a subquery.

select sites.domain_name, batch.batch_name from sites, batch

where exists (select batch.id from batch

              where sites.batchid = batch.id) limit 1


Reply all
Reply to author
Forward
0 new messages