SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE view load.[NW_GW_VK] 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), Verkäufer)             AS Verkäufer,
       convert(varchar(255), Fabrikat)              AS Fabrikat,
       convert(int, Fabrikat_Order_By)              AS Fabrikat_Order_By,
       convert(varchar(20), Model)                  AS Model,
       convert(varchar(500), FZG)                   AS FZG,
       convert(varchar(150), Konto)                 AS Konto,
       convert(varchar(255), Modell_Beschreibung)   AS Modell_Beschreibung,
       convert(varchar(250), Kunde)                 AS Kunde,
       convert(varchar(20), Kundenart)              AS Kundenart,
       convert(varchar(20), Fahrzeugart)            AS Fahrzeugart,
       convert(varchar(20), Fahrzeugtyp)            AS Fahrzeugtyp,
       convert(varchar(20), Fahrzeugtyp_1)          AS Fahrzeugtyp_1,
       convert(varchar(500), FZG_Detail)            AS FZG_Detail,
       convert(varchar(500), Buch_Text)             AS Buch_Text,
       convert(varchar(20), PLZ_1)                  AS PLZ_1,
       convert(varchar(20), PLZ_2)                  AS PLZ_2,
       convert(varchar(20), PLZ_3)                  AS PLZ_3,
       convert(varchar(20), PLZ_4)                  AS PLZ_4,
       convert(varchar(100), PLZ_Code_Deb)          AS [PLZ Code_Deb],
       convert(varchar(100), Name_Lieferant)        AS Name_Lieferant,
       convert(varchar(20), DB1___0)                AS [DB1 < 0],
       convert(varchar(100), Name_Einkäufer)        AS Name_Einkäufer,
       convert(decimal(28, 8), Menge)               AS Menge,
       convert(decimal(28, 8), Erlös_FZG)           AS [Erlös FZG],
       convert(decimal(28, 8), Einsatz_FZG)         AS [Einsatz FZG],
       convert(decimal(28, 8), Boni)                AS Boni,
       convert(decimal(28, 8), Nachlass)            AS Nachlass,
       convert(decimal(28, 8), Erlös_Prov_)         AS [Erlös Prov.],
       convert(decimal(28, 8), Erlös_Überf_)        AS [Erlös Überf.],
       convert(decimal(28, 8), VAK_Überf_)          AS [VAK Überf.],
       convert(decimal(28, 8), Erlös_Gar_)          AS [Erlös Gar.],
       convert(decimal(28, 8), VAK_Gar_)            AS [VAK Gar.],
       convert(decimal(28, 8), Erlös_Zul_)          AS [Erlös Zul.],
       convert(decimal(28, 8), VAK_Zul_)            AS [VAK Zul.],
       convert(decimal(28, 8), Erlös_Nachr_)        AS [Erlös Nachr.],
       convert(decimal(28, 8), VAK_Nachr_)          AS [VAK Nachr.],
       convert(decimal(28, 8), Erlös_Sonst_)        AS [Erlös Sonst.],
       convert(decimal(28, 8), VAK_Sonst_)          AS [VAK Sonst.],
       convert(decimal(28, 8), VAK_Inst_setz_)      AS [VAK Inst.setz.],
       convert(decimal(28, 8), Standtage)           AS Standtage,
       convert(decimal(28, 8), Instands__Werkstatt) AS [Instands. Werkstatt],
       convert(decimal(28, 8), Instands__Teile)     AS [Instands. Teile],
       convert(decimal(28, 8), Instandsetzung_ges_) AS [Instandsetzung ges.],
       convert(decimal(28, 8), Gesamterlöse)        AS Gesamterlöse,
       convert(decimal(28, 8), Einsatz_Gesamt)      AS [Einsatz Gesamt],
       convert(datetime, Invoice_Date)              AS [Invoice Date],
       convert(decimal(28, 8), VAK_intern)          AS [VAK intern],
       convert(varchar(100), PKW_NFZ)               AS [PKW/NFZ]
from transform.[NW_GW_VK]
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
