Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have Table A
ID | Availability |
1 | high |
2 | medium |
3 | low |
4 | low |
5 | low |
6 | high |
7 | medium |
8 | medium |
and Table B
ID | approve_date |
1 | 20-04-2022 |
3 | 23-04-2022 |
8 | 24-04-2022 |
I want the values which which Table A has and Table B doesn't have.
Final table should be like this
ID | Availability |
2 | medium |
4 | low |
5 | low |
6 | high |
7 | medium |
How can i get this?
Thanks in advance for your help...
Try something like this:
ExludedIDs:
LOAD ID as ExcludedID
FROM TableB;
FinalTable:
LOAD ID, Availability
FROM TableA
WHERE NOT Exists(ExcludedID , ID);
DROP TABLE ExludedIDs;
Thanks for your quick reply...
Can u explain a little more with clear script?
thank you
Try pasting this script into your script editor.
ExludedIDs:
LOAD ID as ExcludedID
INLINE [
ID, approve_date
1, 20-04-2022
3, 23-04-2022
8, 24-04-2022
];
FinalTable:
LOAD ID, Availability
INLINE [
ID, Availability
1, high
2, medium
3, low
4, low
5, low
6, high
7, medium
8, medium
]
WHERE NOT Exists(ExcludedID , ID);
DROP TABLE ExludedIDs;
You will end up with a FinalTable table with data as in the image below.