LEFT JION returns incorrect result
Exports, LEFT JIOIN returns incorrect result, please help! details as following:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
SQL> select count(1) From YJS_1Y20_B01 a left join V_ IRPT_DEPARTMENTS b on (a.USERID_=b.KEY) where (a.BBQ_ like '201102%') and ((b.DM2 = '140000842744' and b.DM1 = '000000836146')
Or (b.DM2 = '130000734443' and b.DM1 = '000000836146'));
Or (b.DM2 = '130000734443'
COUNT(1)
----------
13
SQL> select count(1) From YJS_1Y20_B01 a left join V_ IRPT_DEPARTMENTS b on (a.USERID_=b.KEY) where (a.BBQ_ like '201102%') and ((b.DM2 = '140000842744' and b.DM1 = '000000836146') );
0