SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE   VIEW [load].[Fibu_Bilanzsalden_kumuliert] AS
SELECT [B].[Client_DB] AS [Client_DB]
     , [B].[Branch Code] AS [Branch Code]
     , [Sachkontonr_] AS [Konto_Nr]
     , [Geschaeftsjahr] AS [Geschaeftsjahr]
     , [Periode] AS [Periode]
     , [Buchungsdatum] AS [Buchungsdatum]
     , [EB_berechnet] AS [EB_berechnet]
     , [Saldo_ohne_EB] AS [Saldo_ohne_EB]
     , [Saldo_kumuliert] AS [Saldo_kumuliert]
     , [Konto_Bilanz] AS [Konto_Bilanz]
     , [S].[Hauptbetrieb_ID]
     , [S].[Hauptbetrieb_Name]
     , [S].[Standort_ID]
     , [S].[Standort_Name]
     , [K].[Jahr/Monat]
     , [K].[Monatserster]
     , [K].[Monatsletzter]
     , [K].[MUN_DATE]
     , [K].[Mitgliedsname]
     , [K].[Beginn Geschäftsjahr]
     , [K].[Monat_Jahr]
     , [K].[Jahr]
     , [K].[Monat]
     , [K].[Tag]
     , [K].[Monat_kurz]
FROM [transform].[Bilanzsalden_kumuliert] [B]
         LEFT JOIN [transform].[Kalender_C11] [K] ON [B].[Buchungsdatum] = [K].[Datum]
         LEFT JOIN [x_data].[AH_Standort] [S] ON [B].[Client_DB] = [S].[Client_DB] AND [B].[Branch Code] = [S].[Branch Code]
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
