Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

is null

$
0
0

Hi Gurus,

 

I have some table pairs with nearly same structure like the tables below:

 

A_TABLE:

 

A_IDsomething not important
1
2
B

 

B_TABLE:

 

B_IDsomething 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_IDB_ID
1<NULL>
2<NULL>
B<NULL>

 

instead of the expected result:

 

A_IDB_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!


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>