|
@@ -0,0 +1,178 @@
|
|
|
+SET QUOTED_IDENTIFIER ON
|
|
|
+GO
|
|
|
+SET ANSI_NULLS ON
|
|
|
+GO
|
|
|
+CREATE VIEW [dbo].[TFM_fBuchungsbelege95_3]
|
|
|
+
|
|
|
+AS
|
|
|
+
|
|
|
+SELECT [TFM_vfBuchungsbelege].[Mandant ID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Konto]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Belegdatum]
|
|
|
+ ,[TFM_vfBuchungsbelege].[BU-Schlüssel]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Gegenkonto]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Buchungstext]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Belegfeld 1]
|
|
|
+ ,[TFM_vfBuchungsbelege].[BSNr]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Herkunft-Kz]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Belegfeld 2]
|
|
|
+ ,[TFM_vfBuchungsbelege].[KOST1 - Kostenstelle]
|
|
|
+ ,[TFM_vfBuchungsbelege].[KOST2 - Kostenstelle]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Kost-Menge]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Stück]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Buchungs GUID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Leistungsdatum]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Datum Zuord Steuerperiode]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Konto_Datev_Kontenbeschriftung]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Kontobeschriftung_Datev_Kontenbeschriftung]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Kostenstelle_Traeger]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Kurzbezeichnung]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Langbezeichnung]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Konto_Zeichen]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Länge_Konto_Zeichen]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Standort_ID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Marke_ID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[KST_ID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Absatzkanal_ID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Antriebsart_ID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Bookkeep Date]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Kostenträger_ID]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Acct Nr]
|
|
|
+ ,[TFM_vfBuchungsbelege].[KST_mit_Bez]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Marke_mit_Bez]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Kostenträger_mit_Bez]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Absatzkanal_mit_Bez]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Text]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Umsatz Soll]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Umsatz Haben]
|
|
|
+ ,[TFM_vfBuchungsbelege].[Betrag]
|
|
|
+ ,[TFM_vfBuchungsbelege].[PK_Auto]
|
|
|
+ ,[TFM_vdKonto].[Konto_Nr-Bez.]
|
|
|
+ ,[TFM_vdKonto].[Konto_Art]
|
|
|
+ ,[TFM_vdKonto].[Kostenstelle]
|
|
|
+ ,[TFM_vdKonto].[STK]
|
|
|
+ ,[TFM_vdKonto].[Konto_1]
|
|
|
+ ,[TFM_vdKonto].[Konto_2]
|
|
|
+ ,[TFM_vdKonto].[Konto_3]
|
|
|
+ ,[TFM_vdKonto].[Konto_4]
|
|
|
+ ,[TFM_vdKonto].[Konto_5]
|
|
|
+ ,[TFM_vdKonto].[Ebene1]
|
|
|
+ ,[TFM_vdKonto].[Ebene2]
|
|
|
+ ,[TFM_vdKonto].[Ebene3]
|
|
|
+ ,[TFM_vdKonto].[Ebene4]
|
|
|
+ ,[TFM_vdKonto].[Ebene5]
|
|
|
+ ,[TFM_vdKonto].[Ebene6]
|
|
|
+ ,[TFM_vdKonto].[Ebene7]
|
|
|
+ ,[TFM_vdKonto].[Ebene8]
|
|
|
+ ,[TFM_vdKonto].[Ebene9]
|
|
|
+ ,[TFM_vdKonto].[Ebene10]
|
|
|
+ ,[TFM_vdKonto].[Ebene11]
|
|
|
+ ,[TFM_vdKonto].[Ebene12]
|
|
|
+ ,[TFM_vdKonto].[Ebene13]
|
|
|
+ ,[TFM_vdKonto].[Ebene14]
|
|
|
+ ,[TFM_vdKonto].[Ebene15]
|
|
|
+ ,[TFM_vdKonto].[Ebene16]
|
|
|
+ ,[TFM_vdKonto].[Ebene17]
|
|
|
+ ,[TFM_vdKonto].[Ebene18]
|
|
|
+ ,[TFM_vdKonto].[Ebene19]
|
|
|
+ ,[TFM_vdKonto].[Ebene20]
|
|
|
+ ,[TFM_vdKonto].[Ebene21]
|
|
|
+ ,[TFM_vdKonto].[Ebene22]
|
|
|
+ ,[TFM_vdKonto].[Ebene23]
|
|
|
+ ,[TFM_vdKonto].[Ebene24]
|
|
|
+ ,[TFM_vdKonto].[Ebene25]
|
|
|
+ ,[TFM_vdKonto].[Ebene26]
|
|
|
+ ,[TFM_vdKonto].[Ebene27]
|
|
|
+ ,[TFM_vdKonto].[Ebene28]
|
|
|
+ ,[TFM_vdKonto].[Ebene29]
|
|
|
+ ,[TFM_vdKonto].[Ebene30]
|
|
|
+ ,[TFM_vdKonto].[Ebene31]
|
|
|
+ ,[TFM_vdKonto].[Ebene32]
|
|
|
+ ,[TFM_vdKonto].[Ebene33]
|
|
|
+ ,[TFM_vdKonto].[Ebene34]
|
|
|
+ ,[TFM_vdKonto].[Ebene35]
|
|
|
+ ,[TFM_vdKonto].[Ebene36]
|
|
|
+ ,[TFM_vdKonto].[Ebene37]
|
|
|
+ ,[TFM_vdKonto].[Ebene38]
|
|
|
+ ,[TFM_vdKonto].[Ebene39]
|
|
|
+ ,[TFM_vdKonto].[Ebene40]
|
|
|
+ ,[TFM_vdKonto].[Ebene41]
|
|
|
+ ,[TFM_vdKonto].[Ebene42]
|
|
|
+ ,[TFM_vdKonto].[Ebene43]
|
|
|
+ ,[TFM_vdKonto].[Ebene44]
|
|
|
+ ,[TFM_vdKonto].[Ebene45]
|
|
|
+ ,[TFM_vdKonto].[Ebene46]
|
|
|
+ ,[TFM_vdKonto].[Ebene47]
|
|
|
+ ,[TFM_vdKonto].[Ebene48]
|
|
|
+ ,[TFM_vdKonto].[Ebene49]
|
|
|
+ ,[TFM_vdKonto].[Ebene50]
|
|
|
+ ,[TFM_vdKonto].[Ebene51]
|
|
|
+ ,[TFM_vdKonto].[Ebene52]
|
|
|
+ ,[TFM_vdKonto].[Ebene53]
|
|
|
+ ,[TFM_vdKonto].[Ebene54]
|
|
|
+ ,[TFM_vdKonto].[Ebene55]
|
|
|
+ ,[TFM_vdKonto].[Ebene56]
|
|
|
+ ,[TFM_vdKonto].[Ebene57]
|
|
|
+ ,[TFM_vdKonto].[Ebene58]
|
|
|
+ ,[TFM_vdKonto].[Ebene59]
|
|
|
+ ,[TFM_vdKonto].[Ebene60]
|
|
|
+ ,[TFM_vdKonto].[Ebene61]
|
|
|
+ ,[TFM_vdKonto].[Ebene62]
|
|
|
+ ,[TFM_vdKonto].[Ebene63]
|
|
|
+ ,[TFM_vdKonto].[Ebene64]
|
|
|
+ ,[TFM_vdKonto].[Ebene65]
|
|
|
+ ,[TFM_vdKonto].[Ebene66]
|
|
|
+ ,[TFM_vdKonto].[Ebene67]
|
|
|
+ ,[TFM_vdKonto].[Ebene68]
|
|
|
+ ,[TFM_vdKonto].[Ebene69]
|
|
|
+ ,[TFM_vdKonto].[Ebene70]
|
|
|
+ ,[TFM_vdKonto].[Ebene71]
|
|
|
+ ,[TFM_vdKonto].[Ebene72]
|
|
|
+ ,[TFM_vdKonto].[Ebene73]
|
|
|
+ ,[TFM_vdKonto].[Ebene74]
|
|
|
+ ,[TFM_vdKonto].[Ebene75]
|
|
|
+ ,[TFM_vdKonto].[Ebene76]
|
|
|
+ ,[TFM_vdKonto].[Ebene77]
|
|
|
+ ,[TFM_vdKonto].[Ebene78]
|
|
|
+ ,[TFM_vdKonto].[Ebene79]
|
|
|
+ ,[TFM_vdKonto].[Ebene80]
|
|
|
+ ,[TFM_vdKonto].[Ebene81]
|
|
|
+ ,[TFM_vdKonto].[Ebene82]
|
|
|
+ ,[TFM_vdKonto].[Ebene83]
|
|
|
+ ,[TFM_vdKonto].[Ebene84]
|
|
|
+ ,[TFM_vdKonto].[Ebene85]
|
|
|
+ ,[TFM_vdKonto].[Ebene86]
|
|
|
+ ,[TFM_vdKonto].[Ebene87]
|
|
|
+ ,[TFM_vdKonto].[Ebene88]
|
|
|
+ ,[TFM_vdKonto].[Ebene89]
|
|
|
+ ,[TFM_vdKonto].[Ebene90]
|
|
|
+ ,[TFM_vdKonto].[Ebene91]
|
|
|
+ ,[TFM_vdKonto].[Ebene92]
|
|
|
+ ,[TFM_vdKonto].[Ebene93]
|
|
|
+ ,[TFM_vdKonto].[Ebene94]
|
|
|
+ ,[TFM_vdKonto].[Ebene95]
|
|
|
+ ,[TFM_vdKonto].[Ebene96]
|
|
|
+ ,[TFM_vdKonto].[Ebene97]
|
|
|
+ ,[TFM_vdKonto].[Ebene98]
|
|
|
+ ,[TFM_vdKonto].[Ebene99]
|
|
|
+ ,[TFM_vdKonto].[Ebene100]
|
|
|
+ ,[TFM_vdStandort].[Hauptbetrieb_Name]
|
|
|
+ ,[TFM_vdStandort].[Standort_Name]
|
|
|
+
|
|
|
+ FROM [dbo].[TFM_vfBuchungsbelege]
|
|
|
+
|
|
|
+ LEFT JOIN [dbo].[TFM_vdKonto]
|
|
|
+ ON [TFM_vfBuchungsbelege].[Mandant ID] = [TFM_vdKonto].[Mandant ID]
|
|
|
+ AND [TFM_vfBuchungsbelege].[Acct Nr] = [TFM_vdKonto].[Konto_Nr]
|
|
|
+
|
|
|
+ LEFT JOIN [dbo].[TFM_vdStandort]
|
|
|
+ ON [TFM_vfBuchungsbelege].[Mandant ID] = [TFM_vdStandort].[Mandant ID]
|
|
|
+ --AND [TFM_vfBuchungsbelege].[Hauptbetrieb_ID] = [TFM_vdStandort].[Hauptbetrieb_ID]
|
|
|
+ AND [TFM_vfBuchungsbelege].[Standort_ID] = [TFM_vdStandort].[Standort_ID]
|
|
|
+GO
|
|
|
+SET QUOTED_IDENTIFIER OFF
|
|
|
+GO
|
|
|
+SET ANSI_NULLS OFF
|
|
|
+GO
|
|
|
+
|
|
|
+GO
|