We help IT Professionals succeed at work.

Left outer join

steven
steven asked
on
I am trying to pull all locations that are not in the itemloc table but it is not working..I must not know how to the left outer works?

      select m.*
                        from   location_mst m
                              left outer join Itemloc_mst i on i.loc = m.loc
                        where m.description <> 'pa1'
                        and i.loc is null
                        ------and   i.loc <> 'stock'
                    order by i.loc
Comment
Watch Question

developer
Commented:
select m.*
                        from   location_mst m
                              left outer join Itemloc_mst i on i.loc = m.loc
                        where m.description in  ('pa1')
                        and i.loc is null
                     order by m.loc
stevendeveloper

Author

Commented:
This pulled correctly I sory