View: dbo.Employee_Work_Location_Payroll_Department_View
View definition
`create view dbo.Employee_Work_Location_Payroll_Department_View as select employee_work_location_payroll_department_KEY = W.employee_work_location_payroll_department_KEY , employee_KEY = W.employee_KEY , payroll_department_KEY = W.payroll_department_KEY , is_primary = W.is_primary , work_location_KEY = W.work_location_KEY , pay_distribution_percent = W.pay_distribution_percent , employee_work_location_payroll_department_guid = W.employee_work_location_payroll_department_guid , department__active_status_KEY = CASE WHEN D.is_active = 1 THEN 1 WHEN D.is_active = 0 THEN 2 ELSE NULL END from dbo.Employee_Work_Location_Payroll_Department W Left outer join dbo.Payroll_Department D on W.payroll_department_KEY = D.payroll_department_KEY`