Database Tuning (MOSC)

MOSC Banner

LEFT JION returns incorrect result

edited Mar 7, 2012 3:11PM in Database Tuning (MOSC) 7 commentsAnswered
Exports,           LEFT JIOIN returns incorrect result, please help! details as following:

          ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
           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'));
 
           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') );

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center