SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE view [load].[offene_Auftraege_Teile] 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), Serviceberater)    AS Serviceberater,
       convert(varchar(500), Order_Number)      AS [Order Number],
       convert(varchar(100), Fabrikat)          AS Fabrikat,
       convert(int, Fabrikat_Order_By)          AS Fabrikat_Order_By,
       convert(varchar(50), Model)              AS Model,
       convert(varchar(50), Fahrzeug)           AS Fahrzeug,
       convert(varchar(50), Kostenstelle)       AS Kostenstelle,
       convert(varchar(255), Marke)             AS Marke,
       convert(varchar(250), Kunde)             AS Kunde,
       convert(varchar(20), Turnover_Type_Desc) AS Turnover_Type_Desc,
       convert(decimal(28, 8), Tage_offen)      AS [Tage offen],
       convert(decimal(28, 8), DG)              AS DG,
       convert(decimal(28, 8), Lohn)            AS Lohn,
       convert(decimal(28, 8), Teile)           AS Teile,
       convert(decimal(28, 8), Sonst_)          AS [Sonst.],
       convert(datetime, Invoice_Date)          AS [Invoice Date],
	   convert(varchar(250), Position)          AS Position
from transform.offene_Auftraege_Teile
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
