SELECT C.CUSTNO, C.[DESC], C.CONTDATE, C.CONTEXP, s.SERVCODE, s.ACTIVERATE
FROM SERVMED S
left outer join Customer c on s.level1 = c.level1
WHERE s.SERVCODE IN('NB', 'TC','ND','BO','FO','BS', 'PW')
and c.level1 = c.id
and s.level='1'
and c.inactive = 'False'
order by c.custno, s.servcode
|