Quantcast
Channel: SCN: Message List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 8968

Re: Issue with the Full Outer join

$
0
0

Hi Sai Krishna,

Thanks for the reply, i understood the point that you are trying to specify but then the usual behavior of the full outer join is it retrieves the tuples from both the tables regardless of the matching elements, but then the result set that i am getting has put me in doldrums.

 

PFA the image below: (This is what i am trying to achieve through the query) Capture.PNG

As a workaround i am able to achieve it this way:

 

Select T2."OrderID",T1."CustomerID",T1."CustomerName",T2."Product",

T2."Total_Units" from "CUSTOMER" AS T1 LEFT JOIN "SALES_ORDER"AS T2 ON T1."CustomerID" = T2."CustomerID"

union

Select T2."OrderID",T2."CustomerID",T1."CustomerName",T2."Product",

T2."Total_Units" from "CUSTOMER" AS T1 RIGHT JOIN "SALES_ORDER"AS T2 ON T1."CustomerID" = T2."CustomerID";

 

by blending the queries (left & right joins) with a union.

 

Regards,

krishna


Viewing all articles
Browse latest Browse all 8968

Trending Articles



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