SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE VIEW [dbo].[TFM_fStempelzeiten95_3] AS SELECT [TFM_vfStempelzeiten].[Mandant ID] ,[TFM_vfStempelzeiten].[Standort_ID] ,[TFM_vfStempelzeiten].[Invoice Date] ,[TFM_vfStempelzeiten].[Anwesenheit Mech Karo Lack] ,[TFM_vfStempelzeiten].[Hauptbetrieb_ID] ,[TFM_vfStempelzeiten].[Anwesenheit Meister] ,[TFM_vdStandort].[Hauptbetrieb_Name] ,[TFM_vdStandort].[Standort_Name] ,[TFM_vdMitarbeiter].[Zuordnung Produktbuchungsgruppe] ,[TFM_vdMitarbeiter].[Zuordnung Produktbuchungsgruppe] AS [Produktbuchungsgruppe] FROM [dbo].[TFM_vfStempelzeiten] LEFT JOIN [dbo].[TFM_vdStandort] ON [TFM_vfStempelzeiten].[Mandant ID] = [TFM_vdStandort].[Mandant ID] AND [TFM_vfStempelzeiten].[Hauptbetrieb_ID] = [TFM_vdStandort].[Hauptbetrieb_ID] AND [TFM_vfStempelzeiten].[Standort_ID] = [TFM_vdStandort].[Standort_ID] LEFT JOIN [dbo].[TFM_vdMitarbeiter] ON [TFM_vfStempelzeiten].[Mandant ID] = [TFM_vdMitarbeiter].[Mandant ID] AND [TFM_vfStempelzeiten].[MonteurNr] = [TFM_vdMitarbeiter].[Mitarbeiter ID] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO GO