Hi Gurus,
I have some table pairs with nearly same structure like the tables below:
A_TABLE:
A_ID | something not important |
---|---|
1 | |
2 | |
B |
B_TABLE:
B_ID | something not important |
---|---|
1 | |
2 |
I would like to filter out what is in NOT in B_TABLE, and union the result with the other pairs.
The SQL syntax would be the following:
SELECT DISTINCT a_id, b_id
FROM A_TABLE AS a
LEFT OUTER JOIN B_TABLE as b
ON a.a_id = b.b_id
WHERE b.b_id IS NULL
(then UNION the other pairs...)
My problem is that when I do the join in an attribute view and I use the filter on B_ID then I get the following result
A_ID | B_ID |
---|---|
1 | <NULL> |
2 | <NULL> |
B | <NULL> |
instead of the expected result:
A_ID | B_ID |
---|---|
B | <NULL> |
Why?
I know that the above SQL could be used in a scripted view, but I would like to use attribute views and a calculation view to union the pairs....
THX for the help!