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

get record not satisfying join condition

$
0
0

Hi Team,

 

I am facing issue in fetching the record which do not satisfy the join condition. Below are details-

 

 

table1

 

MATERIAL  SOURCE_PLANT

M1                SYW1             

M2                 SWW1

M4               AABB

M5              AEW1

M6                AYW1

M7               AABB

 

table 2

 

MATERIAL RECEIVING_PLANT  SOURCE_PLANT PROC_TYPE

M1              AEW1                              SYW1               SY

M2              AYW1                              SWW1              SW

M3               AZW1                              DWW1               DW

 

 

Now I need to check the material and source plant combination records from the table2 in table1

 

Ex- M1 and SYW1 exist in table1 so I need to skip this record

similarly M2 and SWW1 exist in table so I need to skip this record

M3 and AZW1 DOES NOT exist in table1 hence I need to LIST this record in my output..

 

How to achieve this in HANA model-

I have written a script for this as below but is not working-

 

 

 

SELECT t1."MATNR", t1."Source_plant"FROM"_SYS_BIC"."pk-sample.safetystock/ZCV_MARC" t1

 

WHERENOTEXISTS

 

(selectt2.MATNR, t2.source_plant from"_SYS_BIC"."pk-sample.safetystock/ZAN_MARC" t2 where

 

t1.MATNR = t2.MATNR

 

AND t1.WERKS = t2.source_plant)

 

groupby"MATNR" , "SOBSL";

 

 

 



Viewing all articles
Browse latest Browse all 6412

Trending Articles



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