View: dbo.Employee_Payroll_Item_Special_Timing_View
View definition
`CREATE VIEW dbo.Employee_Payroll_Item_Special_Timing_View WITH SCHEMABINDING AS SELECT e.employee_KEY, pist.payroll_item_special_timing_KEY, pist.payroll_item_special_timing_frequency_KEY, pist.selected_week_one, pist.selected_week_two, pist.selected_week_three, pist.selected_week_four, pist.selected_week_five, pist.payroll_item_special_timing_selected_payroll_period_basis_KEY, pist.selected_payroll__payroll_item_special_timing_date_basis_KEY, pist.start_date, pist.end_date, pist.payroll_item_special_timing_date_basis_KEY FROM dbo.Employee e JOIN dbo.Employee_Payroll_Item epi on e.employee_KEY = epi.employee_KEY JOIN dbo.Employee_Payroll_Item_N_Payroll_Item_Special_Timing epinpist on epinpist.employee_payroll_item_KEY = epi.employee_payroll_item_KEY JOIN dbo.Payroll_Item_Special_Timing pist on pist.payroll_item_special_timing_KEY = epinpist.payroll_item_special_timing_KEY UNION SELECT e.employee_KEY, pist.payroll_item_special_timing_KEY, pist.payroll_item_special_timing_frequency_KEY, pist.selected_week_one, pist.selected_week_two, pist.selected_week_three, pist.selected_week_four, pist.selected_week_five, pist.payroll_item_special_timing_selected_payroll_period_basis_KEY, pist.selected_payroll__payroll_item_special_timing_date_basis_KEY, pist.start_date, pist.end_date, pist.payroll_item_special_timing_date_basis_KEY FROM dbo.Employee e JOIN dbo.Employee_Payroll_Item epi on e.employee_KEY = epi.employee_KEY JOIN dbo.Child_Support_Order cso on cso.employee_payroll_item_KEY = epi.employee_payroll_item_KEY JOIN dbo.Payroll_Item_Special_Timing pist on pist.payroll_item_special_timing_KEY = cso.payroll_item_special_timing_KEY UNION SELECT e.employee_KEY, pist.payroll_item_special_timing_KEY, pist.payroll_item_special_timing_frequency_KEY, pist.selected_week_one, pist.selected_week_two, pist.selected_week_three, pist.selected_week_four, pist.selected_week_five, pist.payroll_item_special_timing_selected_payroll_period_basis_KEY, pist.selected_payroll__payroll_item_special_timing_date_basis_KEY, pist.start_date, pist.end_date, pist.payroll_item_special_timing_date_basis_KEY FROM dbo.Employee e JOIN dbo.Employee_Payroll_Item epi on e.employee_KEY = epi.employee_KEY JOIN dbo.Creditor_Garnishment_Order cgo on cgo.employee_payroll_item_KEY = epi.employee_payroll_item_KEY JOIN dbo.Payroll_Item_Special_Timing pist on pist.payroll_item_special_timing_KEY = cgo.payroll_item_special_timing_KEY UNION SELECT e.employee_KEY, pist.payroll_item_special_timing_KEY, pist.payroll_item_special_timing_frequency_KEY, pist.selected_week_one, pist.selected_week_two, pist.selected_week_three, pist.selected_week_four, pist.selected_week_five, pist.payroll_item_special_timing_selected_payroll_period_basis_KEY, pist.selected_payroll__payroll_item_special_timing_date_basis_KEY, pist.start_date, pist.end_date, pist.payroll_item_special_timing_date_basis_KEY FROM dbo.Employee e JOIN dbo.Employee_Payroll_Item epi on e.employee_KEY = epi.employee_KEY JOIN dbo.Employee_Payroll_Item_Garnishment_Order epigo on epigo.employee_payroll_item_KEY = epi.employee_payroll_item_KEY JOIN dbo.Garnishment_Order gno on gno.garnishment_order_KEY = epigo.garnishment_order_KEY JOIN dbo.Payroll_Item_Special_Timing pist on pist.payroll_item_special_timing_KEY = gno.payroll_item_special_timing_KEY`