|
@@ -0,0 +1,615 @@
|
|
|
+CREATE VIEW [load].[current_date_Prognose]
|
|
|
+AS
|
|
|
+SELECT --[Bundeslaender Id] AS "Bundeslaender Id",
|
|
|
+ [Invoice Date] AS "Bookkeep Date",
|
|
|
+ --[Wochentage Id] AS "Wochentage Id",
|
|
|
+ --[Arbeitstag Mofr] AS "Arbeitstag Mofr",
|
|
|
+ [Zaehler Mofr] AS "Zaehler Mofr",
|
|
|
+ [Summe Mofr] AS "Summe Mofr",
|
|
|
+ --[Arbeitstag Mosa] AS "Arbeitstag Mosa",
|
|
|
+ --[Zaehler Mosa] AS "Zaehler Mosa",
|
|
|
+ --[Summe Mosa] AS "Summe Mosa",
|
|
|
+ --[Feiertage Id] AS "Feiertage Id",
|
|
|
+ --[Jahr] AS "Jahr",
|
|
|
+ [Arbeitstag Nr Jahr] AS "Arbeitstag Nr Jahr",
|
|
|
+ [Gesamt Arbeitstage] AS "Gesamt Arbeitstage",
|
|
|
+ Monat_Belege AS "Monat_Belege"
|
|
|
+FROM [staging].[current_date_Prognose_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[Kontenrahmen]
|
|
|
+AS
|
|
|
+SELECT --[Konto_Nr] AS "Konto_Nr",
|
|
|
+ --[Konto_Bezeichnung] AS "Konto_Bezeichnung",
|
|
|
+ --[Konto_Art] AS "Konto_Art",
|
|
|
+ --[Kostenstelle] AS "Kostenstelle",
|
|
|
+ --[STK] AS "STK",
|
|
|
+ --[Konto_1] AS "Konto_1",
|
|
|
+ --[Konto_2] AS "Konto_2",
|
|
|
+ --[Konto_3] AS "Konto_3",
|
|
|
+ --[Konto_4] AS "Konto_4",
|
|
|
+ --[Konto_5] AS "Konto_5",
|
|
|
+ --[Ebene1] AS "Ebene1",
|
|
|
+ --[Ebene2] AS "Ebene2",
|
|
|
+ --[Ebene3] AS "Ebene3",
|
|
|
+ --[Ebene4] AS "Ebene4",
|
|
|
+ --[Ebene5] AS "Ebene5",
|
|
|
+ --[Ebene6] AS "Ebene6",
|
|
|
+ --[Ebene7] AS "Ebene7",
|
|
|
+ --[Ebene8] AS "Ebene8",
|
|
|
+ --[Ebene9] AS "Ebene9",
|
|
|
+ --[Ebene10] AS "Ebene10",
|
|
|
+ [Ebene11] AS "Ebene11",
|
|
|
+ --[Ebene12] AS "Ebene12",
|
|
|
+ --[Ebene13] AS "Ebene13",
|
|
|
+ --[Ebene14] AS "Ebene14",
|
|
|
+ --[Ebene15] AS "Ebene15",
|
|
|
+ --[Ebene16] AS "Ebene16",
|
|
|
+ --[Ebene17] AS "Ebene17",
|
|
|
+ --[Ebene18] AS "Ebene18",
|
|
|
+ --[Ebene19] AS "Ebene19",
|
|
|
+ --[Ebene20] AS "Ebene20",
|
|
|
+ [Ebene21] AS "Ebene21",
|
|
|
+ --[Ebene22] AS "Ebene22",
|
|
|
+ --[Ebene23] AS "Ebene23",
|
|
|
+ --[Ebene24] AS "Ebene24",
|
|
|
+ --[Ebene25] AS "Ebene25",
|
|
|
+ --[Ebene26] AS "Ebene26",
|
|
|
+ --[Ebene27] AS "Ebene27",
|
|
|
+ --[Ebene28] AS "Ebene28",
|
|
|
+ --[Ebene29] AS "Ebene29",
|
|
|
+ --[Ebene30] AS "Ebene30",
|
|
|
+ [Ebene31] AS "Ebene31",
|
|
|
+ --[Ebene32] AS "Ebene32",
|
|
|
+ --[Ebene33] AS "Ebene33",
|
|
|
+ --[Ebene34] AS "Ebene34",
|
|
|
+ --[Ebene35] AS "Ebene35",
|
|
|
+ --[Ebene36] AS "Ebene36",
|
|
|
+ --[Ebene37] AS "Ebene37",
|
|
|
+ --[Ebene38] AS "Ebene38",
|
|
|
+ --[Ebene39] AS "Ebene39",
|
|
|
+ --[Ebene40] AS "Ebene40",
|
|
|
+ --[Ebene41] AS "Ebene41",
|
|
|
+ --[Ebene42] AS "Ebene42",
|
|
|
+ --[Ebene43] AS "Ebene43",
|
|
|
+ --[Ebene44] AS "Ebene44",
|
|
|
+ --[Ebene45] AS "Ebene45",
|
|
|
+ --[Ebene46] AS "Ebene46",
|
|
|
+ --[Ebene47] AS "Ebene47",
|
|
|
+ --[Ebene48] AS "Ebene48",
|
|
|
+ --[Ebene49] AS "Ebene49",
|
|
|
+ --[Ebene50] AS "Ebene50",
|
|
|
+ [Ebene51] AS "Ebene51",
|
|
|
+ [Ebene52] AS "Ebene52",
|
|
|
+ [Ebene53] AS "Ebene53",
|
|
|
+ [Ebene54] AS "Ebene54",
|
|
|
+ [Ebene55] AS "Ebene55",
|
|
|
+ [Ebene56] AS "Ebene56",
|
|
|
+ --[Ebene57] AS "Ebene57",
|
|
|
+ --[Ebene58] AS "Ebene58",
|
|
|
+ --[Ebene59] AS "Ebene59",
|
|
|
+ --[Ebene60] AS "Ebene60",
|
|
|
+ [Ebene61] AS "Ebene61",
|
|
|
+ [Ebene62] AS "Ebene62",
|
|
|
+ [Ebene63] AS "Ebene63",
|
|
|
+ [Ebene64] AS "Ebene64",
|
|
|
+ [Ebene65] AS "Ebene65",
|
|
|
+ [Ebene66] AS "Ebene66",
|
|
|
+ --[Ebene67] AS "Ebene67",
|
|
|
+ --[Ebene68] AS "Ebene68",
|
|
|
+ --[Ebene69] AS "Ebene69",
|
|
|
+ --[Ebene70] AS "Ebene70"
|
|
|
+FROM [staging].[Kontenrahmen_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[Kontenrahmen_GC_Struct_SKR]
|
|
|
+AS
|
|
|
+SELECT --[Konto Nr] AS "Konto Nr",
|
|
|
+ --[Konto Bezeichnung] AS "Konto Bezeichnung",
|
|
|
+ --[Konto Art_ori] AS "Konto Art_ori",
|
|
|
+ --[Kostenstelle] AS "Kostenstelle",
|
|
|
+ --[Stk] AS "Stk",
|
|
|
+ --[Konto 1] AS "Konto 1",
|
|
|
+ --[Konto 2] AS "Konto 2",
|
|
|
+ --[Konto 3] AS "Konto 3",
|
|
|
+ --[Konto 4] AS "Konto 4",
|
|
|
+ --[Konto 5] AS "Konto 5",
|
|
|
+ --[Ebene1] AS "Ebene1",
|
|
|
+ --[Ebene2] AS "Ebene2",
|
|
|
+ --[Ebene3] AS "Ebene3",
|
|
|
+ --[Ebene4] AS "Ebene4",
|
|
|
+ --[Ebene5] AS "Ebene5",
|
|
|
+ --[Ebene6] AS "Ebene6",
|
|
|
+ --[Ebene7] AS "Ebene7",
|
|
|
+ --[Ebene8] AS "Ebene8",
|
|
|
+ --[Ebene9] AS "Ebene9",
|
|
|
+ --[Ebene10] AS "Ebene10",
|
|
|
+ [Ebene11] AS "Ebene11",
|
|
|
+ --[Ebene12] AS "Ebene12",
|
|
|
+ --[Ebene13] AS "Ebene13",
|
|
|
+ --[Ebene14] AS "Ebene14",
|
|
|
+ --[Ebene15] AS "Ebene15",
|
|
|
+ --[Ebene16] AS "Ebene16",
|
|
|
+ --[Ebene17] AS "Ebene17",
|
|
|
+ --[Ebene18] AS "Ebene18",
|
|
|
+ --[Ebene19] AS "Ebene19",
|
|
|
+ --[Ebene20] AS "Ebene20",
|
|
|
+ [Ebene21] AS "Ebene21",
|
|
|
+ --[Ebene22] AS "Ebene22",
|
|
|
+ --[Ebene23] AS "Ebene23",
|
|
|
+ --[Ebene24] AS "Ebene24",
|
|
|
+ --[Ebene25] AS "Ebene25",
|
|
|
+ --[Ebene26] AS "Ebene26",
|
|
|
+ --[Ebene27] AS "Ebene27",
|
|
|
+ --[Ebene28] AS "Ebene28",
|
|
|
+ --[Ebene29] AS "Ebene29",
|
|
|
+ --[Ebene30] AS "Ebene30",
|
|
|
+ [Ebene31] AS "Ebene31",
|
|
|
+ --[Ebene32] AS "Ebene32",
|
|
|
+ --[Ebene33] AS "Ebene33",
|
|
|
+ --[Ebene34] AS "Ebene34",
|
|
|
+ --[Ebene35] AS "Ebene35",
|
|
|
+ --[Ebene36] AS "Ebene36",
|
|
|
+ --[Ebene37] AS "Ebene37",
|
|
|
+ --[Ebene38] AS "Ebene38",
|
|
|
+ --[Ebene39] AS "Ebene39",
|
|
|
+ --[Ebene40] AS "Ebene40",
|
|
|
+ --[Ebene41] AS "Ebene41",
|
|
|
+ --[Ebene42] AS "Ebene42",
|
|
|
+ --[Ebene43] AS "Ebene43",
|
|
|
+ --[Ebene44] AS "Ebene44",
|
|
|
+ --[Ebene45] AS "Ebene45",
|
|
|
+ --[Ebene46] AS "Ebene46",
|
|
|
+ --[Ebene47] AS "Ebene47",
|
|
|
+ --[Ebene48] AS "Ebene48",
|
|
|
+ --[Ebene49] AS "Ebene49",
|
|
|
+ --[Ebene50] AS "Ebene50",
|
|
|
+ [Ebene51] AS "Ebene51",
|
|
|
+ [Ebene52] AS "Ebene52",
|
|
|
+ [Ebene53] AS "Ebene53",
|
|
|
+ [Ebene54] AS "Ebene54",
|
|
|
+ [Ebene55] AS "Ebene55",
|
|
|
+ [Ebene56] AS "Ebene56",
|
|
|
+ --[Ebene57] AS "Ebene57",
|
|
|
+ --[Ebene58] AS "Ebene58",
|
|
|
+ --[Ebene59] AS "Ebene59",
|
|
|
+ --[Ebene60] AS "Ebene60",
|
|
|
+ [Ebene61] AS "Ebene61",
|
|
|
+ [Ebene62] AS "Ebene62",
|
|
|
+ [Ebene63] AS "Ebene63",
|
|
|
+ [Ebene64] AS "Ebene64",
|
|
|
+ [Ebene65] AS "Ebene65",
|
|
|
+ [Ebene66] AS "Ebene66",
|
|
|
+ --[Ebene67] AS "Ebene67",
|
|
|
+ --[Ebene68] AS "Ebene68",
|
|
|
+ --[Ebene69] AS "Ebene69",
|
|
|
+ --[Ebene70] AS "Ebene70",
|
|
|
+ [Ebene71] AS "Ebene71",
|
|
|
+ [Ebene72] AS "Ebene72",
|
|
|
+ [Ebene73] AS "Ebene73",
|
|
|
+ [Ebene74] AS "Ebene74",
|
|
|
+ [Ebene75] AS "Ebene75",
|
|
|
+ [Ebene76] AS "Ebene76",
|
|
|
+ [Ebene77] AS "Ebene77",
|
|
|
+ --[Ebene78] AS "Ebene78",
|
|
|
+ --[Ebene79] AS "Ebene79",
|
|
|
+ --[Ebene80] AS "Ebene80",
|
|
|
+ --[Anzahl Stellen_Konto_Nr] AS "Anzahl Stellen_Konto_Nr",
|
|
|
+ --[Konto Art] AS "Konto Art",
|
|
|
+ [GuV_Bilanz] AS "GuV_Bilanz",
|
|
|
+ [Acct Nr] AS "Acct Nr",
|
|
|
+ [Konto] AS "Konto",
|
|
|
+ [Susa] AS "Susa"
|
|
|
+FROM [staging].[Kontenrahmen_GC_Struct_SKR_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[Kontenrahmen_KST_90]
|
|
|
+AS
|
|
|
+SELECT --[Konto_Nr] AS "Konto_Nr",
|
|
|
+ --[_90] AS "_90",
|
|
|
+ [Acct Nr] AS "Acct Nr",
|
|
|
+ --[Konto_Bezeichnung] AS "Konto_Bezeichnung",
|
|
|
+ --[Konto_Art] AS "Konto_Art",
|
|
|
+ --[Kostenstelle] AS "Kostenstelle",
|
|
|
+ --[STK] AS "STK",
|
|
|
+ --[Konto_1] AS "Konto_1",
|
|
|
+ --[Konto_2] AS "Konto_2",
|
|
|
+ --[Konto_3] AS "Konto_3",
|
|
|
+ --[Konto_4] AS "Konto_4",
|
|
|
+ --[Konto_5] AS "Konto_5",
|
|
|
+ --[Ebene1] AS "Ebene1",
|
|
|
+ --[Ebene2] AS "Ebene2",
|
|
|
+ --[Ebene3] AS "Ebene3",
|
|
|
+ --[Ebene4] AS "Ebene4",
|
|
|
+ --[Ebene5] AS "Ebene5",
|
|
|
+ --[Ebene6] AS "Ebene6",
|
|
|
+ --[Ebene7] AS "Ebene7",
|
|
|
+ --[Ebene8] AS "Ebene8",
|
|
|
+ --[Ebene9] AS "Ebene9",
|
|
|
+ --[Ebene10] AS "Ebene10",
|
|
|
+ [Ebene11] AS "Ebene11",
|
|
|
+ --[Ebene12] AS "Ebene12",
|
|
|
+ --[Ebene13] AS "Ebene13",
|
|
|
+ --[Ebene14] AS "Ebene14",
|
|
|
+ --[Ebene15] AS "Ebene15",
|
|
|
+ --[Ebene16] AS "Ebene16",
|
|
|
+ --[Ebene17] AS "Ebene17",
|
|
|
+ --[Ebene18] AS "Ebene18",
|
|
|
+ --[Ebene19] AS "Ebene19",
|
|
|
+ --[Ebene20] AS "Ebene20",
|
|
|
+ [Ebene21] AS "Ebene21",
|
|
|
+ --[Ebene22] AS "Ebene22",
|
|
|
+ --[Ebene23] AS "Ebene23",
|
|
|
+ --[Ebene24] AS "Ebene24",
|
|
|
+ --[Ebene25] AS "Ebene25",
|
|
|
+ --[Ebene26] AS "Ebene26",
|
|
|
+ --[Ebene27] AS "Ebene27",
|
|
|
+ --[Ebene28] AS "Ebene28",
|
|
|
+ --[Ebene29] AS "Ebene29",
|
|
|
+ --[Ebene30] AS "Ebene30",
|
|
|
+ [Ebene31] AS "Ebene31",
|
|
|
+ --[Ebene32] AS "Ebene32",
|
|
|
+ --[Ebene33] AS "Ebene33",
|
|
|
+ --[Ebene34] AS "Ebene34",
|
|
|
+ --[Ebene35] AS "Ebene35",
|
|
|
+ --[Ebene36] AS "Ebene36",
|
|
|
+ --[Ebene37] AS "Ebene37",
|
|
|
+ --[Ebene38] AS "Ebene38",
|
|
|
+ --[Ebene39] AS "Ebene39",
|
|
|
+ --[Ebene40] AS "Ebene40",
|
|
|
+ --[Ebene41] AS "Ebene41",
|
|
|
+ --[Ebene42] AS "Ebene42",
|
|
|
+ --[Ebene43] AS "Ebene43",
|
|
|
+ --[Ebene44] AS "Ebene44",
|
|
|
+ --[Ebene45] AS "Ebene45",
|
|
|
+ --[Ebene46] AS "Ebene46",
|
|
|
+ --[Ebene47] AS "Ebene47",
|
|
|
+ --[Ebene48] AS "Ebene48",
|
|
|
+ --[Ebene49] AS "Ebene49",
|
|
|
+ --[Ebene50] AS "Ebene50",
|
|
|
+ [Ebene51] AS "Ebene51",
|
|
|
+ [Ebene52] AS "Ebene52",
|
|
|
+ [Ebene53] AS "Ebene53",
|
|
|
+ [Ebene54] AS "Ebene54",
|
|
|
+ [Ebene55] AS "Ebene55",
|
|
|
+ [Ebene56] AS "Ebene56",
|
|
|
+ --[Ebene57] AS "Ebene57",
|
|
|
+ --[Ebene58] AS "Ebene58",
|
|
|
+ --[Ebene59] AS "Ebene59",
|
|
|
+ --[Ebene60] AS "Ebene60",
|
|
|
+ [Ebene61] AS "Ebene61",
|
|
|
+ [Ebene62] AS "Ebene62",
|
|
|
+ [Ebene63] AS "Ebene63",
|
|
|
+ [Ebene64] AS "Ebene64",
|
|
|
+ [Ebene65] AS "Ebene65",
|
|
|
+ [Ebene66] AS "Ebene66",
|
|
|
+ --[Ebene67] AS "Ebene67",
|
|
|
+ --[Ebene68] AS "Ebene68",
|
|
|
+ --[Ebene69] AS "Ebene69",
|
|
|
+ --[Ebene70] AS "Ebene70",
|
|
|
+ [Ebene71] AS "Ebene71",
|
|
|
+ [Ebene72] AS "Ebene72",
|
|
|
+ [Ebene73] AS "Ebene73",
|
|
|
+ [Ebene74] AS "Ebene74",
|
|
|
+ [Ebene75] AS "Ebene75",
|
|
|
+ [Ebene76] AS "Ebene76",
|
|
|
+ [Ebene77] AS "Ebene77",
|
|
|
+ --[Ebene78] AS "Ebene78",
|
|
|
+ --[Ebene79] AS "Ebene79",
|
|
|
+ --[Ebene80] AS "Ebene80"
|
|
|
+FROM [staging].[Kontenrahmen_KST_90_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[Kontenrahmen_STK]
|
|
|
+AS
|
|
|
+SELECT --[Konto_Nr] AS "Konto_Nr",
|
|
|
+ --[Konto_Bezeichnung] AS "Konto_Bezeichnung",
|
|
|
+ --[Konto_Art] AS "Konto_Art",
|
|
|
+ --[Kostenstelle] AS "Kostenstelle",
|
|
|
+ --[STK] AS "STK",
|
|
|
+ --[Konto_1] AS "Konto_1",
|
|
|
+ --[Konto_2] AS "Konto_2",
|
|
|
+ --[Konto_3] AS "Konto_3",
|
|
|
+ --[Konto_4] AS "Konto_4",
|
|
|
+ --[Konto_5] AS "Konto_5",
|
|
|
+ --[Ebene1] AS "Ebene1",
|
|
|
+ --[Ebene2] AS "Ebene2",
|
|
|
+ --[Ebene3] AS "Ebene3",
|
|
|
+ --[Ebene4] AS "Ebene4",
|
|
|
+ --[Ebene5] AS "Ebene5",
|
|
|
+ --[Ebene6] AS "Ebene6",
|
|
|
+ --[Ebene7] AS "Ebene7",
|
|
|
+ --[Ebene8] AS "Ebene8",
|
|
|
+ --[Ebene9] AS "Ebene9",
|
|
|
+ --[Ebene10] AS "Ebene10",
|
|
|
+ [Ebene11] AS "Ebene11",
|
|
|
+ --[Ebene12] AS "Ebene12",
|
|
|
+ --[Ebene13] AS "Ebene13",
|
|
|
+ --[Ebene14] AS "Ebene14",
|
|
|
+ --[Ebene15] AS "Ebene15",
|
|
|
+ --[Ebene16] AS "Ebene16",
|
|
|
+ --[Ebene17] AS "Ebene17",
|
|
|
+ --[Ebene18] AS "Ebene18",
|
|
|
+ --[Ebene19] AS "Ebene19",
|
|
|
+ --[Ebene20] AS "Ebene20",
|
|
|
+ [Ebene21] AS "Ebene21",
|
|
|
+ --[Ebene22] AS "Ebene22",
|
|
|
+ --[Ebene23] AS "Ebene23",
|
|
|
+ --[Ebene24] AS "Ebene24",
|
|
|
+ --[Ebene25] AS "Ebene25",
|
|
|
+ --[Ebene26] AS "Ebene26",
|
|
|
+ --[Ebene27] AS "Ebene27",
|
|
|
+ --[Ebene28] AS "Ebene28",
|
|
|
+ --[Ebene29] AS "Ebene29",
|
|
|
+ --[Ebene30] AS "Ebene30",
|
|
|
+ [Ebene31] AS "Ebene31",
|
|
|
+ --[Ebene32] AS "Ebene32",
|
|
|
+ --[Ebene33] AS "Ebene33",
|
|
|
+ --[Ebene34] AS "Ebene34",
|
|
|
+ --[Ebene35] AS "Ebene35",
|
|
|
+ --[Ebene36] AS "Ebene36",
|
|
|
+ --[Ebene37] AS "Ebene37",
|
|
|
+ --[Ebene38] AS "Ebene38",
|
|
|
+ --[Ebene39] AS "Ebene39",
|
|
|
+ --[Ebene40] AS "Ebene40",
|
|
|
+ --[Ebene41] AS "Ebene41",
|
|
|
+ --[Ebene42] AS "Ebene42",
|
|
|
+ --[Ebene43] AS "Ebene43",
|
|
|
+ --[Ebene44] AS "Ebene44",
|
|
|
+ --[Ebene45] AS "Ebene45",
|
|
|
+ --[Ebene46] AS "Ebene46",
|
|
|
+ --[Ebene47] AS "Ebene47",
|
|
|
+ --[Ebene48] AS "Ebene48",
|
|
|
+ --[Ebene49] AS "Ebene49",
|
|
|
+ --[Ebene50] AS "Ebene50",
|
|
|
+ [Ebene51] AS "Ebene51",
|
|
|
+ [Ebene52] AS "Ebene52",
|
|
|
+ [Ebene53] AS "Ebene53",
|
|
|
+ [Ebene54] AS "Ebene54",
|
|
|
+ [Ebene55] AS "Ebene55",
|
|
|
+ [Ebene56] AS "Ebene56",
|
|
|
+ --[Ebene57] AS "Ebene57",
|
|
|
+ --[Ebene58] AS "Ebene58",
|
|
|
+ --[Ebene59] AS "Ebene59",
|
|
|
+ --[Ebene60] AS "Ebene60",
|
|
|
+ [Ebene61] AS "Ebene61",
|
|
|
+ [Ebene62] AS "Ebene62",
|
|
|
+ [Ebene63] AS "Ebene63",
|
|
|
+ [Ebene64] AS "Ebene64",
|
|
|
+ [Ebene65] AS "Ebene65",
|
|
|
+ [Ebene66] AS "Ebene66",
|
|
|
+ --[Ebene67] AS "Ebene67",
|
|
|
+ --[Ebene68] AS "Ebene68",
|
|
|
+ --[Ebene69] AS "Ebene69",
|
|
|
+ --[Ebene70] AS "Ebene70"
|
|
|
+FROM [staging].[Kontenrahmen_STK_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[SKR_Absatzkanal]
|
|
|
+AS
|
|
|
+SELECT [Ebene21] AS "Ebene21",
|
|
|
+ [Absatzkanal_mit_Bez] AS "Absatzkanal_mit_Bez",
|
|
|
+ --[Ebene23] AS "Ebene23",
|
|
|
+ --[Ebene24] AS "Ebene24",
|
|
|
+ --[Ebene25] AS "Ebene25",
|
|
|
+ --[Ebene26] AS "Ebene26",
|
|
|
+ --[Ebene27] AS "Ebene27",
|
|
|
+ --[Ebene28] AS "Ebene28",
|
|
|
+ --[Ebene29] AS "Ebene29",
|
|
|
+ --[Ebene30] AS "Ebene30",
|
|
|
+ [Absatzkanal] AS "Absatzkanal"
|
|
|
+FROM [staging].[SKR_Absatzkanal_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[SKR_Herkunft_KST]
|
|
|
+AS
|
|
|
+SELECT [Ebene11] AS "Ebene11",
|
|
|
+ [KST_mit_Bez] AS "KST_mit_Bez",
|
|
|
+ --[Ebene13] AS "Ebene13",
|
|
|
+ --[Ebene14] AS "Ebene14",
|
|
|
+ --[Ebene15] AS "Ebene15",
|
|
|
+ --[Ebene16] AS "Ebene16",
|
|
|
+ --[Ebene17] AS "Ebene17",
|
|
|
+ --[Ebene18] AS "Ebene18",
|
|
|
+ --[Ebene19] AS "Ebene19",
|
|
|
+ --[Ebene20] AS "Ebene20",
|
|
|
+ [KST] AS "KST"
|
|
|
+FROM [staging].[SKR_Herkunft_KST_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[SKR_Kostenträger]
|
|
|
+AS
|
|
|
+SELECT [Ebene31] AS "Ebene31",
|
|
|
+ --[Ebene32] AS "Ebene32",
|
|
|
+ --[Ebene33] AS "Ebene33",
|
|
|
+ --[Ebene34] AS "Ebene34",
|
|
|
+ --[Ebene35] AS "Ebene35",
|
|
|
+ --[Ebene36] AS "Ebene36",
|
|
|
+ --[Ebene37] AS "Ebene37",
|
|
|
+ --[Ebene38] AS "Ebene38",
|
|
|
+ --[Ebene39] AS "Ebene39",
|
|
|
+ --[Ebene40] AS "Ebene40",
|
|
|
+ [Kostenträger_mit_Bez] AS "Kostenträger_mit_Bez",
|
|
|
+ --[Ebene_Marke] AS "Ebene_Marke",
|
|
|
+ [Kostenträger_FIBU] AS "Kostenträger_FIBU"
|
|
|
+FROM [staging].[SKR_Kostenträger_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[SKR_Marke]
|
|
|
+AS
|
|
|
+SELECT [Marke_mit_Bez] AS "Marke_mit_Bez",
|
|
|
+ --[Ebene42] AS "Ebene42",
|
|
|
+ --[Ebene43] AS "Ebene43",
|
|
|
+ --[Ebene44] AS "Ebene44",
|
|
|
+ --[Ebene45] AS "Ebene45",
|
|
|
+ --[Ebene46] AS "Ebene46",
|
|
|
+ --[Ebene47] AS "Ebene47",
|
|
|
+ --[Ebene48] AS "Ebene48",
|
|
|
+ --[Ebene49] AS "Ebene49",
|
|
|
+ --[Ebene50] AS "Ebene50",
|
|
|
+ [Marke] AS "Marke"
|
|
|
+FROM [staging].[SKR_Marke_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[Belege_EDS_SKR_ohne_KST_90]
|
|
|
+AS
|
|
|
+SELECT [Rechtseinheit_ID] AS "Rechtseinheit_ID",
|
|
|
+ [Rechtseinheit_Name] AS "Rechtseinheit_Name",
|
|
|
+ [Betrieb_ID] AS "Betrieb_ID",
|
|
|
+ [Betrieb_Name] AS "Betrieb_Name",
|
|
|
+ [Konto] AS "Konto",
|
|
|
+ [Acct Nr] AS "Acct Nr",
|
|
|
+ [Text] AS "Text",
|
|
|
+ --[Kostenstelle_ori] AS "Kostenstelle_ori",
|
|
|
+ --[KST_mit_Bez_ori] AS "KST_mit_Bez_ori",
|
|
|
+ [KST] AS "KST",
|
|
|
+ [Markencode] AS "Markencode",
|
|
|
+ [Fahrgestellnummer] AS "Fahrgestellnummer",
|
|
|
+ [Konto_Buchung] AS "Konto_Buchung",
|
|
|
+ --[Marke_mit_Bez_ori] AS "Marke_mit_Bez_ori",
|
|
|
+ [Marke] AS "Marke",
|
|
|
+ --[Ebene21_ori] AS "Ebene21_ori",
|
|
|
+ --[Absatzkanal_mit_Bez_ori] AS "Absatzkanal_mit_Bez_ori",
|
|
|
+ [Absatzkanal] AS "Absatzkanal",
|
|
|
+ --[Ebene31_ori] AS "Ebene31_ori",
|
|
|
+ --[Kostenträger_mit_Bez_ori] AS "Kostenträger_mit_Bez_ori",
|
|
|
+ [Kostenträger_FIBU] AS "Kostenträger_FIBU",
|
|
|
+ [Ebene71] AS "Ebene71",
|
|
|
+ [Ebene72] AS "Ebene72",
|
|
|
+ [Ebene73] AS "Ebene73",
|
|
|
+ [Ebene74] AS "Ebene74",
|
|
|
+ [Ebene75] AS "Ebene75",
|
|
|
+ [Ebene76] AS "Ebene76",
|
|
|
+ [Ebene77] AS "Ebene77",
|
|
|
+ --[Ebene81] AS "Ebene81",
|
|
|
+ --[Ebene82] AS "Ebene82",
|
|
|
+ --[Ebene83] AS "Ebene83",
|
|
|
+ --[Ebene84] AS "Ebene84",
|
|
|
+ --[Ebene85] AS "Ebene85",
|
|
|
+ --[Ebene86] AS "Ebene86",
|
|
|
+ [GuV_Bilanz] AS "GuV_Bilanz",
|
|
|
+ [Susa] AS "Susa",
|
|
|
+ [Mandant] AS "Mandant",
|
|
|
+ [Ist] AS "Ist",
|
|
|
+ [Menge] AS "Menge",
|
|
|
+ --[Fabrikat] AS "Fabrikat",
|
|
|
+ --[Fabrikat_Order_By] AS "Fabrikat_Order_By",
|
|
|
+ [Bookkeep Date] AS "Bookkeep Date",
|
|
|
+ [Ebene61] AS "Ebene61",
|
|
|
+ [Ebene62] AS "Ebene62",
|
|
|
+ [Ebene63] AS "Ebene63",
|
|
|
+ [Ebene64] AS "Ebene64",
|
|
|
+ [Ebene65] AS "Ebene65",
|
|
|
+ [Ebene66] AS "Ebene66",
|
|
|
+ Monat_Belege AS "Monat_Belege"
|
|
|
+FROM [staging].[Belege_EDS_SKR_ohne_KST_90_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[Belege_EDS_SKR_KST_90]
|
|
|
+AS
|
|
|
+SELECT [Rechtseinheit_ID] AS "Rechtseinheit_ID",
|
|
|
+ [Rechtseinheit_Name] AS "Rechtseinheit_Name",
|
|
|
+ [Betrieb_ID] AS "Betrieb_ID",
|
|
|
+ [Betrieb_Name] AS "Betrieb_Name",
|
|
|
+ [Konto] AS "Konto",
|
|
|
+ [Acct Nr] AS "Acct Nr",
|
|
|
+ [Text] AS "Text",
|
|
|
+ --[Kostenstelle_ori] AS "Kostenstelle_ori",
|
|
|
+ --[KST_mit_Bez_ori] AS "KST_mit_Bez_ori",
|
|
|
+ [KST] AS "KST",
|
|
|
+ [Markencode] AS "Markencode",
|
|
|
+ [Fahrgestellnummer] AS "Fahrgestellnummer",
|
|
|
+ [Konto_Buchung] AS "Konto_Buchung",
|
|
|
+ --[Marke_mit_Bez_ori] AS "Marke_mit_Bez_ori",
|
|
|
+ [Marke] AS "Marke",
|
|
|
+ --[Ebene21_ori] AS "Ebene21_ori",
|
|
|
+ --[Absatzkanal_mit_Bez_ori] AS "Absatzkanal_mit_Bez_ori",
|
|
|
+ [Absatzkanal] AS "Absatzkanal",
|
|
|
+ --[Ebene31_ori] AS "Ebene31_ori",
|
|
|
+ --[Kostenträger_mit_Bez_ori] AS "Kostenträger_mit_Bez_ori",
|
|
|
+ [Kostenträger_FIBU] AS "Kostenträger_FIBU",
|
|
|
+ [Ebene71] AS "Ebene71",
|
|
|
+ [Ebene72] AS "Ebene72",
|
|
|
+ [Ebene73] AS "Ebene73",
|
|
|
+ [Ebene74] AS "Ebene74",
|
|
|
+ [Ebene75] AS "Ebene75",
|
|
|
+ [Ebene76] AS "Ebene76",
|
|
|
+ [Ebene77] AS "Ebene77",
|
|
|
+ --[Ebene81] AS "Ebene81",
|
|
|
+ --[Ebene82] AS "Ebene82",
|
|
|
+ --[Ebene83] AS "Ebene83",
|
|
|
+ --[Ebene84] AS "Ebene84",
|
|
|
+ --[Ebene85] AS "Ebene85",
|
|
|
+ --[Ebene86] AS "Ebene86",
|
|
|
+ [GuV_Bilanz] AS "GuV_Bilanz",
|
|
|
+ [Susa] AS "Susa",
|
|
|
+ [Mandant] AS "Mandant",
|
|
|
+ [Ist] AS "Ist",
|
|
|
+ [Menge] AS "Menge",
|
|
|
+ --[Fabrikat] AS "Fabrikat",
|
|
|
+ --[Fabrikat_Order_By] AS "Fabrikat_Order_By",
|
|
|
+ [Bookkeep Date] AS "Bookkeep Date",
|
|
|
+ [Ebene61] AS "Ebene61",
|
|
|
+ [Ebene62] AS "Ebene62",
|
|
|
+ [Ebene63] AS "Ebene63",
|
|
|
+ [Ebene64] AS "Ebene64",
|
|
|
+ [Ebene65] AS "Ebene65",
|
|
|
+ [Ebene66] AS "Ebene66",
|
|
|
+ Monat_Belege AS "Monat_Belege"
|
|
|
+FROM [staging].[Belege_EDS_SKR_KST_90_fm]
|
|
|
+GO
|
|
|
+
|
|
|
+CREATE VIEW [load].[Belege_EDS_SKR_Stk]
|
|
|
+AS
|
|
|
+SELECT [Rechtseinheit_ID] AS "Rechtseinheit_ID",
|
|
|
+ [Rechtseinheit_Name] AS "Rechtseinheit_Name",
|
|
|
+ [Betrieb_ID] AS "Betrieb_ID",
|
|
|
+ [Betrieb_Name] AS "Betrieb_Name",
|
|
|
+ [Konto] AS "Konto",
|
|
|
+ [Acct Nr] AS "Acct Nr",
|
|
|
+ [Text] AS "Text",
|
|
|
+ --[Kostenstelle_ori] AS "Kostenstelle_ori",
|
|
|
+ --[KST_mit_Bez_ori] AS "KST_mit_Bez_ori",
|
|
|
+ [KST] AS "KST",
|
|
|
+ [Markencode] AS "Markencode",
|
|
|
+ [Fahrgestellnummer] AS "Fahrgestellnummer",
|
|
|
+ [Konto_Buchung] AS "Konto_Buchung",
|
|
|
+ --[Marke_mit_Bez_ori] AS "Marke_mit_Bez_ori",
|
|
|
+ [Marke] AS "Marke",
|
|
|
+ --[Ebene21_ori] AS "Ebene21_ori",
|
|
|
+ --[Absatzkanal_mit_Bez_ori] AS "Absatzkanal_mit_Bez_ori",
|
|
|
+ [Absatzkanal] AS "Absatzkanal",
|
|
|
+ --[Ebene31_ori] AS "Ebene31_ori",
|
|
|
+ --[Kostenträger_mit_Bez_ori] AS "Kostenträger_mit_Bez_ori",
|
|
|
+ [Kostenträger_FIBU] AS "Kostenträger_FIBU",
|
|
|
+ [Ebene71] AS "Ebene71",
|
|
|
+ [Ebene72] AS "Ebene72",
|
|
|
+ [Ebene73] AS "Ebene73",
|
|
|
+ [Ebene74] AS "Ebene74",
|
|
|
+ [Ebene75] AS "Ebene75",
|
|
|
+ [Ebene76] AS "Ebene76",
|
|
|
+ [Ebene77] AS "Ebene77",
|
|
|
+ --[Ebene81] AS "Ebene81",
|
|
|
+ --[Ebene82] AS "Ebene82",
|
|
|
+ --[Ebene83] AS "Ebene83",
|
|
|
+ --[Ebene84] AS "Ebene84",
|
|
|
+ --[Ebene85] AS "Ebene85",
|
|
|
+ --[Ebene86] AS "Ebene86",
|
|
|
+ [GuV_Bilanz] AS "GuV_Bilanz",
|
|
|
+ [Susa] AS "Susa",
|
|
|
+ [Mandant] AS "Mandant",
|
|
|
+ [Ist] AS "Ist_Stk",
|
|
|
+ [Menge] AS "Menge",
|
|
|
+ --[Fabrikat] AS "Fabrikat",
|
|
|
+ --[Fabrikat_Order_By] AS "Fabrikat_Order_By",
|
|
|
+ [Bookkeep Date] AS "Bookkeep Date",
|
|
|
+ [Ebene61] AS "Ebene61",
|
|
|
+ [Ebene62] AS "Ebene62",
|
|
|
+ [Ebene63] AS "Ebene63",
|
|
|
+ [Ebene64] AS "Ebene64",
|
|
|
+ [Ebene65] AS "Ebene65",
|
|
|
+ [Ebene66] AS "Ebene66",
|
|
|
+ Monat_Belege AS "Monat_Belege"
|
|
|
+FROM [staging].[Belege_EDS_SKR_Stk_fm]
|
|
|
+GO
|
|
|
+
|