Solved:

qry_has_owner = (db.owner.id.belongs(db()._select(db.dog.id_owner)))

db(~qry_has_owner).select()


On Sun, Sep 13, 2009 at 2:13 AM, Thadeus Burgess <[email protected]>wrote:

> How would I construct a query to determine if a field is not in another
> table?
>
> example
>
> db.owner.id not in db.dogs.id_owner
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to