SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE VIEW dbo.OP_ARI_test
AS
SELECT        [load].OP_ARI.Client_DB, [load].OP_ARI.[Document Type], [load].OP_ARI.[Document No], [load].OP_ARI.[User Id], [load].OP_ARI.[On Hold], [load].OP_ARI.[Branch Code], [load].OP_ARI.Vin, [load].OP_ARI.Comment, 
                         [load].OP_ARI.offen, [load].OP_ARI.[Gesamt offen KD (Info)], [load].OP_ARI.[Invoice Date], [load].OP_ARI.Hauptbetrieb, [load].OP_ARI.Standort, [load].OP_ARI.[Sel Name], [load].OP_ARI.Kunde, [load].OP_ARI.Beleg, 
                         [load].OP_ARI.Bereich, [load].OP_ARI.Tage, [load].OP_ARI.Staffel, [load].OP_ARI.Mahnstufe, [load].OP_ARI.Forderungsart, [load].OP_ARI.Abwarten, [load].OP_ARI.[Message To Recipient], [load].OP_ARI.Haft_Kasko, 
                         x_data.AH_Standort.Hauptbetrieb_ID, x_data.AH_Standort.Hauptbetrieb_Name, x_data.AH_Standort.Standort_ID, x_data.AH_Standort.Standort_Name
FROM            [load].OP_ARI LEFT OUTER JOIN
                         x_data.AH_Standort ON [load].OP_ARI.Client_DB = x_data.AH_Standort.Client_DB AND [load].OP_ARI.[Branch Code] = x_data.AH_Standort.[Branch Code]
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
