SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE VIEW [transform].[Zeit_Stempelungen_Pausen_produktiv] AS

SELECT "T3"."Hauptbetrieb" AS [Hauptbetrieb_imr]
     , "T3"."Standort" AS [Standort_imr]
     , "GC_Department"."Hauptbetrieb_ID" AS "Hauptbetrieb_ID"
     , "GC_Department"."Hauptbetrieb_Name" AS "Hauptbetrieb_Name"
     , "GC_Department"."Standort_ID" AS "Standort_ID"
     , "GC_Department"."Standort_Name" AS "Standort_Name"
     , "T3"."Employee Number_Employees" AS [Employee_ID_imr]
     , "GC_Mitarbeiter"."Zuordnung_Funktion" AS "Monteur_Gruppe"
     , "GC_Mitarbeiter"."Zuordnung_Funktion" AS "Monteur_Gruppe_2"
     , "T3"."Monteur" AS "Monteur"
     , "T3"."Order Number" AS "Order_Number"
     , "T3"."Zeitkategorie" AS "Activity_Codes_Group1"
     , "T3"."Zeitkategorie2" AS "Activity_Codes_Group2"
     , '' AS "Activity_Desc"
     , '' AS "Kostenstelle"
     , "T3"."Datum" AS "Invoice_Date"
     , "T3"."Pausenzeit_während_produktiv" AS "prod_"
     , 0.0 AS "unprod__falsch"
     , 0.0 AS "Abw_"
     , 0.0 AS "Extern"
     , 0.0 AS "GWL"
     , 0.0 AS "Intern"
     , 0.0 AS "Sollzeit"
     , 0.0 AS "TOY_produktiv_Zeit"
     , 0.0 AS "verr__Zeit_ohne_TOY"
     , 0.0 AS "ben__Zeit_ohne_TOY"
     , 0.0 AS "Anz__AT"
FROM [transform_imr]."Zeit_Stempelungen_Pausen_produktiv" "T3"
         LEFT OUTER JOIN "data"."GC_Department" "GC_Department" ON "T3"."Hauptbetrieb" = "GC_Department"."Hauptbetrieb" AND "T3"."Standort" = "GC_Department"."Standort"
         LEFT OUTER JOIN "data"."GC_Mitarbeiter" "GC_Mitarbeiter" ON "T3"."Employee Number_Employees" = "GC_Mitarbeiter"."Employee_ID"
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
