SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE VIEW [test_systemvergleich].[OP_aus_LOC_Belege_gesamt_OP01] AS
SELECT T1.Standort_Name
     , T1.Kostenstelle
     , T1.offen AS offen_Kunde
     , T2.offen AS offen_ETL
FROM GC.test.OP_aus_LOC_Belege_gesamt_OP01 T1
         FULL OUTER JOIN test.OP_aus_LOC_Belege_gesamt_OP01 T2 ON
    T1.Standort_Name = T2.Standort_Name AND
    T1.Kostenstelle = T2.Kostenstelle
WHERE T1.[offen] is null
   OR T2.[offen] is null
   OR round([T1].[offen] - [T2].[offen], 2) <> 0.00
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
