on 02-05-2019 12:58 PM
Hi Experts,
I would like to Join two table in CDS and bring the uncommon entries from one table. I have trieed join condition with NOT operator on key field but it does not work. Below is the example of output what i am trying to achieve. If anybody has already implemented this please can you help.
Regards,
Nitin
Assuming you are working with ABAP CDS views you can do that for instance like following:
define view MyView as select from Table1 as t1
left outer join Table2 as t2 on t1.ID = t2.ID {
t1.ID,
t1.Value
} where t2.ID is null;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitin,
I am confused about your question,
But The Image you have post will appear for both logic where output given is 200 which is outer join and 400 which is inner join.
Logic is missing here, I think.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SELECT * FROM Table1 WHERE " ID" IN ( SELECT "ID" FROM "Table1" EXCEPT SELECT "ID" FROM "Table2" )
Hope this solves your issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.