SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE VIEW template.GC_Department AS
SELECT DISTINCT T1."subsidiary_to_company_ref" "Hauptbetrieb"
	,T1."skr51_branch" "Standort"
	,T1."subsidiary_to_company_ref" "Hauptbetrieb_ID"
	,'' AS Hauptbetrieb_Name
	,right('0' + convert(VARCHAR(10), T1."skr51_branch"), 2) "Standort_ID"
	,left(T1."skr51_brach_name", 50) "Standort_Name"
	,NULL as Marke_ID
	,NULL as Marke_Name
	,NULL as Gruppe_ID
	,NULL as Gruppe_Name
	,NULL as Site
FROM "LOCOSOFT"."dbo"."accounts_characteristics" T1
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
