SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE view load.OP_aus_LOC_Belege_nur_8520 AS
select convert(varchar(10), Hauptbetrieb_ID)           AS Hauptbetrieb_ID,
       convert(varchar(50), Hauptbetrieb_Name)         AS Hauptbetrieb_Name,
       convert(varchar(10), Standort_ID)               AS Standort_ID,
       convert(varchar(50), Standort_Name)             AS Standort_Name,
       convert(varchar(150), Sel_Name)                 AS [Sel Name],
       convert(varchar(250), Kunde)                    AS Kunde,
       convert(int, Beleg)                             AS Beleg,
       convert(varchar(20), Kostenstelle)              AS Kostenstelle,
       convert(varchar(20), Bereich)                   AS Bereich,
       convert(varchar(20), Staffel)                   AS Staffel,
       convert(varchar(20), Forderungsart)             AS Forderungsart,
       convert(varchar(10), Abwarten)                  AS Abwarten,
       convert(varchar(10), Leasing)                   AS Leasing,
       convert(decimal(28, 8), offen)                  AS offen,
       convert(decimal(28, 8), Rechnungsbetrag)        AS Rechnungsbetrag,
       convert(decimal(28, 8), Gesamt_offen_KD__Info_) AS [Gesamt offen KD (Info)],
       convert(datetime, Invoice_Date)                 AS [Invoice Date],
       convert(varchar(50), [Bonus/Startguthaben])     AS [Bonus/Startguthaben]
from transform.OP_aus_LOC_Belege_nur_8520
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
