Forum Stats

  • 3,824,920 Users
  • 2,260,440 Discussions
  • 7,896,347 Comments

Discussions

Creating a view based flag from table A and B

User_XPIYY
User_XPIYY Member Posts: 1 Blue Ribbon

scnerio 


table a      table b 

part  flag    part  flag 

test1 Y


Requitment get data based on flag is null 

but when i run the bewlow query getting the records back for part "test1" 

which as you can see has the flag = Y .. would be great help if anyone can assist  

--------------------------------------


select a.part 

 FROM  table a,

     table b 

 WHERE (1=1)

 and a.finis_code = b.finis_code(+)

 and a.finis_code IN ('TEST1','Test2')

 AND (a.FLAG IS NULL OR b.FLAG IS NULL)  

Tagged: