Skip to main content
2 of 2
Code formatted
Michael Green
  • 25.1k
  • 13
  • 53
  • 98

According to given sample data there is "Type" which is common in both table

Select B.PERS, T.DESC
from BaseTable B
right outer Join Testtable T 
on ( T.type is null or B.Type=T.type or B.Type is null)
and T.Grp = 'G1' 
where T.DESC<>'' 
order by B.PERS asc