SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE view load.Zeit_Stempelungen_neu AS
select 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(50), Monteur_Gruppe)         AS Monteur_Gruppe,
       convert(varchar(50), Monteur_Gruppe_2)       AS Monteur_Gruppe_2,
       convert(varchar(200), Monteur)               AS Monteur,
       convert(int, Order_Number)                   AS [Order Number],
       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,
       convert(varchar(20), Kostenstelle)           AS Kostenstelle,
       convert(datetime, Invoice_Date)              AS [Invoice Date],
       convert(decimal(28, 8), prod_)               AS [prod.],
       convert(decimal(28, 8), unprod__falsch)      AS [unprod._falsch],
       convert(decimal(28, 8), Abw_)                AS [Abw.],
       convert(decimal(28, 8), Extern)              AS Extern,
       convert(decimal(28, 8), GWL)                 AS GWL,
       convert(decimal(28, 8), Intern)              AS Intern,
       convert(decimal(28, 8), Sollzeit)            AS Sollzeit,
       convert(decimal(28, 8), TOY_produktiv_Zeit)  AS TOY_produktiv_Zeit,
       convert(decimal(28, 8), verr__Zeit_ohne_TOY) AS [verr. Zeit_ohne_TOY],
       convert(decimal(28, 8), ben__Zeit_ohne_TOY)  AS [ben. Zeit_ohne_TOY],
       convert(decimal(28, 8), Anz__AT)             AS [Anz. AT],
       convert(decimal(28, 8), Anw_)                AS [Anw.],
       convert(varchar(500), Order_Positions_Times) AS [Order Positions_Times],
       convert(varchar(20), Status)                 AS Status,
       convert(decimal(28, 8), prod__aus_o_A_)      AS [prod. aus o.A.],
       convert(decimal(28, 8), productivity_factor) AS productivity_factor,
       convert(varchar(50), [Order Number_Mont])    AS [Order Number_Mont]
from transform.Zeit_Stempelungen_neu
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
