SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
create view load.Zeit_Sollzeit AS
select convert(int, [Employee Number_Employees])       AS [Employee Number_Employees],
       convert(varchar(100), Name_Employees)           AS Name_Employees,
       convert(varchar(10), Initials_Employees)        AS Initials_Employees,
       convert(int, [Mechanic Number_Employees])       AS [Mechanic Number_Employees],
       convert(int, [Salesman Number_Employees])       AS [Salesman Number_Employees],
       convert(datetime, [Employment Date_Employees])  AS [Employment Date_Employees],
       convert(datetime, [Termination Date_Employees]) AS [Termination Date_Employees],
       convert(datetime, [Leave Date_Employees])       AS [Leave Date_Employees],
       convert(varchar(50), Hauptbetrieb)              AS Hauptbetrieb,
       convert(varchar(50), Standort)                  AS Standort,
       convert(varchar(150), Monteur)                  AS Monteur,
       convert(varchar(10), Zeitkategorie)             AS Zeitkategorie,
       convert(varchar(10), Zeitkategorie2)            AS Zeitkategorie2,
       convert(int, [Is Latest Record])                AS [Is Latest Record],
       convert(int, [Employee Number])                 AS [Employee Number],
       convert(datetime, [Validity Date])              AS [Validity Date],
       convert(int, Dayofweek)                         AS Dayofweek,
       convert(decimal(28, 8), [Work Duration])        AS [Work Duration],
       convert(decimal(28, 8), [Worktime Start])       AS [Worktime Start],
       convert(decimal(28, 8), [Worktime End])         AS [Worktime End],
       convert(datetime, Datum)                        AS Datum,
       convert(varchar(255), [Wochentage Id])          AS [Wochentage Id],
       convert(decimal(28, 8), [Soll-Zeit])            AS [Soll-Zeit],
       convert(datetime, [Invoice Date])               AS [Invoice Date],
       convert(varchar(10), Hauptbetrieb_ID)           AS Hauptbetrieb_ID,
       convert(varchar(50), Hauptbetrieb_Name)         AS Hauptbetrieb_Name,
       convert(varchar(10), Standort_ID)               AS Standort_ID,
       convert(varchar(50), Standort_Name)             AS Standort_Name,
       convert(varchar(20), Monteur_Gruppe)            AS Monteur_Gruppe,
       convert(varchar(20), Monteur_Gruppe_2)          AS Monteur_Gruppe_2,
       convert(varchar(20), Activity_Codes_Group1)     AS Activity_Codes_Group1,
       convert(varchar(20), Activity_Codes_Group2)     AS Activity_Codes_Group2,
       convert(varchar(20), Activity_Desc)             AS Activity_Desc
from transform.Zeit_Sollzeit
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
