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

Why LEFT OUTER JOIN returning less records in SAP HANA?

$
0
0

Hi Experts

 

Please help me to find the reason for returning less records while doing LEFT Outer join .

 

This is happening  with a particular column only.

 

 

TOTAL COUNT

select count(*) from "SRC"."TABLE" O
where o.effective_end_dt is null ;

--136,963

 

 

 

TOTAL COUNT WITH LEFT OUTER ON REQUIRED COLUMN ( WRONG COUNT )

select count(*) from "SRC"."TABLE" O  left outer join "SRC"."TABLE_1" A on O.Dept_Id=A.Row_Id 

where o.effective_end_dt is null AND A.EFFECTIVE_END_DT IS NULL  ;

--135,164

 

 

TOTAL COUNT WITH LEFT OUTER ON DIFFERENT COLUMN ( CORRECT COUNT )

 

select count(*) from "SRC"."TABLE" O  left outer join "SRC"."TABLE_1" A on O.row_id=A.Row_Id 

where o.effective_end_dt is null AND A.EFFECTIVE_END_DT IS NULL  ;
--136,963

 

 

Please suggest .

 

Thanks

Anupam .


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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