2017 Nov 22 6:22 AM
How can I implement a FULL OUTER JOIN in ABAP CDS ?
2017 Nov 22 11:45 AM
2017 Nov 22 2:32 PM
I was thinking about
LEFT OUTER JOIN
UNION
RIGHT OUTER JOIN
but I am not sure if this is the best way to do it.
2017 Nov 23 12:01 PM
2017 Nov 22 3:20 PM
CROSS JOIN?
I know it is a difference, but maybe it is what you need?
2017 Nov 23 4:26 PM
Thank you for the suggestion.
While a CROSS JOIN does all combinations of the LHS and RHS, a FULL OUTER JOIN is a UNION of LEFT OUTER and RIGHT OUTER JOINS. I decided to go with the later solution. May not be the best way to do it but I think this is something that one would expect out of CDS views in ABAP given that it is available in HANA.
I can't think of a way to use a CROSS JOIN in lieu of a FULL OUTER JOIN.
Just for the enlightenment of readers, here is a note on FULL OUTER JOIN available in HANA
https://blogs.sap.com/2014/05/25/all-about-joins-using-sql-in-hana/
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |