left outer join

43 views
Skip to first unread message

Al Ex

unread,
Feb 18, 2022, 9:48:35 PM2/18/22
to web...@googlegroups.com
Hi, 

How can I reproduce this LEFT OUTER JOIN in PyDAL ?


SELECT name
FROM doc

    LEFT JOIN (

        SELECT name
        FROM X 
INNER JOIN ...
        WHERE ...
        ) T ON ( T.name = name)

WHERE
    T.name IS NULL


jonatha...@whatho.net

unread,
Feb 20, 2022, 4:15:41 AM2/20/22
to web2py-users

Al Ex

unread,
Feb 20, 2022, 6:33:37 AM2/20/22
to web...@googlegroups.com, jonatha...@whatho.net
Thank you

But what if the left join is made on an arbitrary select, not an already defined table? 
Maybe I am missing something evident


--
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 web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/3e47a5ea-6048-4ea6-a376-b150083a7c31n%40googlegroups.com.

Jonathan Clark

unread,
Feb 20, 2022, 7:26:06 AM2/20/22
to Al Ex, web...@googlegroups.com
Hi,

Sorry I hadn't noticed that was what you meant. I was just trying to say that the book has a section on left joins, like many other topics, which you might not have seen.

It's a long time since I looked at this, but I thought you could treat a select as a table for this kind of thing, but I've never done it. So I'll leave this for more knowledgeable people to answer.

Best wishes.
Reply all
Reply to author
Forward
0 new messages