Thanks DaPi, your answer gives a different resultset that mine does. My query returns nulls if the name is not found. Your query would return the names that exist in both tables.
cursor ajm is
select m.name, dt.dept
from master m, depttable dt
where dt.name(+)=m.name;
With this modification i found it would work fine.
Thanks Anyway