SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE VIEW [test_systemvergleich].[Belege_Bilanz_SKR] AS
SELECT T1.Jahr
     , T1.Rechtseinheit_ID
     , T1.Ebene71
     , T1.Ebene72
     , T1.Ebene73
     , T1.Ist_Bilanz AS Ist_Bilanz_Kunde
     , T2.Ist_Bilanz AS Ist_Bilanz_ETL
FROM GC.test.Belege_Bilanz_SKR T1
         FULL OUTER JOIN test.Belege_Bilanz_SKR T2 ON
    T1.Jahr = T1.Jahr AND
    T1.Rechtseinheit_ID = T2.Rechtseinheit_ID AND
    T1.Ebene71 = T2.Ebene71 AND
    T1.Ebene72 = T2.Ebene72 AND
    T1.Ebene73 = T2.Ebene73
WHERE T1.[Ist_Bilanz] is null
   OR T2.[Ist_Bilanz] is null
   OR round([T1].[Ist_Bilanz] - [T2].[Ist_Bilanz], 2) <> 0.00
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
