>Hello All,
>I need to select some records from a table that are not present in another table, I've heard you can do this with one of the outer joins but am unsure as to how
>
>Regards
>Pete Kane
Pete,
Different strategies depending on what you want :
- Both existing and none existing in table2 -> outer join
select * from mytable ;
left join table2 ;
on mytable.linkexpression = table2.linkexpression
* Table2 fields would be .NULL. for those that do not exist in table2
* All recs from mytable (left table) would be in final cursor
- Only those not in table2 -> subquery
select * from mytable ;
where linkexpression not in ;
(select distinct linkexpression from table2)
Cetin