SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE   VIEW [transform_imr].[kontenrahmen]
AS
SELECT T1."KONTO_NR" AS "Konto Nr",
	T1."KONTO_BEZEICHNUNG" AS "Konto Bezeichnung",
	T1."KONTO_ART" AS "Konto Art_ori",
	T1."KOSTENSTELLE" AS "Kostenstelle",
	T1."STK" AS "Stk",
	T1."KONTO_1" AS "Konto 1",
	T1."KONTO_2" AS "Konto 2",
	T1."KONTO_3" AS "Konto 3",
	T1."KONTO_4" AS "Konto 4",
	T1."KONTO_5" AS "Konto 5",
	T1."EBENE1" AS "Ebene1",
	T1."EBENE2" AS "Ebene2",
	T1."EBENE3" AS "Ebene3",
	T1."EBENE4" AS "Ebene4",
	T1."EBENE5" AS "Ebene5",
	T1."EBENE6" AS "Ebene6",
	T1."EBENE7" AS "Ebene7",
	T1."EBENE8" AS "Ebene8",
	T1."EBENE9" AS "Ebene9",
	T1."EBENE10" AS "Ebene10",
	T1."EBENE11" AS "Ebene11",
	T1."EBENE12" AS "Ebene12",
	T1."EBENE13" AS "Ebene13",
	T1."EBENE14" AS "Ebene14",
	T1."EBENE15" AS "Ebene15",
	T1."EBENE16" AS "Ebene16",
	T1."EBENE17" AS "Ebene17",
	T1."EBENE18" AS "Ebene18",
	T1."EBENE19" AS "Ebene19",
	T1."EBENE20" AS "Ebene20",
	T1."EBENE21" AS "Ebene21",
	T1."EBENE22" AS "Ebene22",
	T1."EBENE23" AS "Ebene23",
	T1."EBENE24" AS "Ebene24",
	T1."EBENE25" AS "Ebene25",
	T1."EBENE26" AS "Ebene26",
	T1."EBENE27" AS "Ebene27",
	T1."EBENE28" AS "Ebene28",
	T1."EBENE29" AS "Ebene29",
	T1."EBENE30" AS "Ebene30",
	T1."EBENE31" AS "Ebene31",
	T1."EBENE32" AS "Ebene32",
	T1."EBENE33" AS "Ebene33",
	T1."EBENE34" AS "Ebene34",
	T1."EBENE35" AS "Ebene35",
	T1."EBENE36" AS "Ebene36",
	T1."EBENE37" AS "Ebene37",
	T1."EBENE38" AS "Ebene38",
	T1."EBENE39" AS "Ebene39",
	T1."EBENE40" AS "Ebene40",
	T1."EBENE41" AS "Ebene41",
	T1."EBENE42" AS "Ebene42",
	T1."EBENE43" AS "Ebene43",
	T1."EBENE44" AS "Ebene44",
	T1."EBENE45" AS "Ebene45",
	T1."EBENE46" AS "Ebene46",
	T1."EBENE47" AS "Ebene47",
	T1."EBENE48" AS "Ebene48",
	T1."EBENE49" AS "Ebene49",
	T1."EBENE50" AS "Ebene50",
	T1."EBENE51" AS "Ebene51",
	T1."EBENE52" AS "Ebene52",
	T1."EBENE53" AS "Ebene53",
	T1."EBENE54" AS "Ebene54",
	T1."EBENE55" AS "Ebene55",
	T1."EBENE56" AS "Ebene56",
	T1."EBENE57" AS "Ebene57",
	T1."EBENE58" AS "Ebene58",
	T1."EBENE59" AS "Ebene59",
	T1."EBENE60" AS "Ebene60",
	T1."EBENE61" AS "Ebene61",
	T1."EBENE62" AS "Ebene62",
	T1."EBENE63" AS "Ebene63",
	T1."EBENE64" AS "Ebene64",
	T1."EBENE65" AS "Ebene65",
	T1."EBENE66" AS "Ebene66",
	T1."EBENE67" AS "Ebene67",
	T1."EBENE68" AS "Ebene68",
	T1."EBENE69" AS "Ebene69",
	T1."EBENE70" AS "Ebene70",
	T1."EBENE71" AS "Ebene71",
	T1."EBENE72" AS "Ebene72",
	T1."EBENE73" AS "Ebene73",
	T1."EBENE74" AS "Ebene74",
	T1."EBENE75" AS "Ebene75",
	T1."EBENE76" AS "Ebene76",
	T1."EBENE77" AS "Ebene77",
	T1."EBENE78" AS "Ebene78",
	T1."EBENE79" AS "Ebene79",
	T1."EBENE80" AS "Ebene80",
	T1."EBENE81" AS "Ebene81",
	T1."EBENE82" AS "Ebene82",
	T1."EBENE83" AS "Ebene83",
	T1."EBENE84" AS "Ebene84",
	T1."EBENE85" AS "Ebene85",
	T1."EBENE86" AS "Ebene86",
	T1."EBENE87" AS "Ebene87",
	T1."EBENE88" AS "Ebene88",
	T1."EBENE89" AS "Ebene89",
	T1."EBENE90" AS "Ebene90",
	(len(T1."KONTO_NR" + 'Z') - 1) AS "Anzahl Stellen_Konto_Nr",
	T1."KONTO_ART" AS "Konto Art",
	T1."KONTO_ART" AS "GuV_Bilanz",
	T1."KONTO_NR" AS "Acct Nr",
	T1."KONTO_NR" + ' - ' + T1."KONTO_BEZEICHNUNG" AS "Konto",
	(left(T1."KONTO_NR", 1)) AS "Susa"
FROM OPENROWSET(BULK 'C:\GlobalCube\GCStruct_SKR51\Kontenrahmen\Kontenrahmen.csv', FORMATFILE = 'C:\GlobalCube\GCStruct_SKR51\Kontenrahmen\Kontenrahmen.csv.xml', FIRSTROW = 2) T1
WHERE (((left(T1."KONTO_NR", 1))) <> '9')
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
