>It should only get the records from t2 which have
>t2.statusid=t1.statusid AND t2.shipref=t1.shipref ...but this doesnt
>seem to work with the left outer join...
select t2.*, t1.flag
from table2 t2
left outer join table1 t1
on (t2.statusid = t1.statusid
and t2.shipref = t1.shipref)