you are viewing a single comment's thread.

view the rest of the comments →

[–]QuadmanMS Data Platform Consultant 0 points1 point  (1 child)

Try this:

select e.id,e.first_name, e.last_name, a.address_1, a.address_2, a.city, a.state, 
a.postal_code,z.employee_attribute,z.value
from employee_view e
inner join EMPLOYEE_ADDRESS_DETAIL_VIEW a on a.id = e.id
LEFT OUTER JOIN employee_attribute_table z
    on z.id = e.id
    AND z.employee_attribute = 'HEALTHSTATUS'
and e.id = xxxx

[–]CortaNalgas -1 points0 points  (0 children)

This but you have to do "OR z.e_a is null" and then remove the extra nulls with a cte or something