Belege_Autoline_History.iqd 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. COGNOS QUERY
  2. STRUCTURE,1,1
  3. DATABASE,GC_AUTOLINE
  4. DATASOURCENAME,C:\GlobalCube\System\Autoline\IQD\belege\Belege_Autoline_History.imr
  5. TITLE,Belege_Autoline_History.imr
  6. BEGIN SQL
  7. select T1."AccountCode" as c1,
  8. T1."CostCentre" as c2,
  9. T1."ExpenseCode" as c3,
  10. T1."NLPeriod" as c4,
  11. T1."NLYear" as c5,
  12. T1."CurrencyType" as c6,
  13. T1."BroughtForward" as c7,
  14. T1."CurrentPostings" as c8,
  15. T1."FuturePostings" as c9,
  16. T1."AdjustmentFlag" as c10,
  17. T1."Adjustment" as c11,
  18. T1."GroupDrBroughtFwd" as c12,
  19. T1."GroupCrBroughtFwd" as c13,
  20. T1."GroupDrCurrent" as c14,
  21. T1."GroupCrCurrent" as c15,
  22. T1."GroupDrFuture" as c16,
  23. T1."GroupCrFuture" as c17,
  24. T1."GroupDrAdjustments" as c18,
  25. T1."GroupCrAdjustments" as c19,
  26. T1."Client_DB" as c20,
  27. ((cinteger(nconvert(((rtrim((cast_numberToString(cast_integer(T1."NLYear"))))) || (asciiz(round(T1."NLPeriod",0,0),2)) || '28')),0))) as c21,
  28. T1."Client_DB" as c22,
  29. T2."Description002" as c23,
  30. T2."AccountType" as c24,
  31. T3."CostCentre" as c25,
  32. T3."ShortName" as c26,
  33. T3."Description001" as c27,
  34. T3."Description002" as c28,
  35. T3."Description003" as c29,
  36. T3."Description004" as c30,
  37. T3."CostCentreGroup" as c31,
  38. T4."CostCentreGroup" as c32,
  39. T4."Description001" as c33,
  40. T4."Description002" as c34,
  41. T4."Description003" as c35,
  42. T4."Description004" as c36,
  43. T5."LocationCode" as c37,
  44. T5."Description" as c38,
  45. T5."LocationName" as c39,
  46. '' as c40,
  47. T5."LocationCode" as c41,
  48. T5."LocationCode" || ' - ' || T5."Description" as c42,
  49. T1."ExpenseCode" as c43,
  50. '' as c44,
  51. T4."CostCentreGroup" || ' - ' || T4."Description002" as c45,
  52. (rtrim((cast_numberToString(cast_integer(T3."CostCentre"))))) || ' - ' || T3."Description002" as c46,
  53. (rtrim((cast_numberToString(cast_integer(T1."NLYear"))))) || (asciiz(round(T1."NLPeriod",0,0),2)) || '28' as c47,
  54. T1."CurrentPostings" as c48,
  55. (cinteger(nconvert(((rtrim((cast_numberToString(cast_integer(T1."NLYear"))))) || (asciiz(round(T1."NLPeriod",0,0),2)) || '28')),0)) as c49
  56. from (((("AUTOLINE"."import"."NL_NominalAccountHistoryFile" T1 left outer join "AUTOLINE"."import"."NL_NominalExpenseCodes" T2 on (T1."ExpenseCode" = T2."ExpenseCode") and (T1."Client_DB" = T2."Client_DB")) left outer join "AUTOLINE"."import"."NL_NominalDepartmentCodes" T3 on (T1."CostCentre" = T3."CostCentre") and (T1."Client_DB" = T3."Client_DB")) left outer join "AUTOLINE"."import"."NL_DepartmentCodeGroups" T4 on (T3."CostCentreGroup" = T4."CostCentreGroup") and (T3."Client_DB" = T4."Client_DB")) left outer join "AUTOLINE"."import"."GB_CompanyLocations" T5 on (od_left((cast_numberToString(cast_integer(T1."CostCentre"))),2)) = T5."LocationCode")
  57. where (((T2."AccountType" = 'P') and (not T3."CostCentreGroup" LIKE '9%')) and (T1."NLYear" > 2018))
  58. END SQL
  59. COLUMN,0,Accountcode
  60. COLUMN,1,Costcentre
  61. COLUMN,2,Expensecode
  62. COLUMN,3,Nlperiod
  63. COLUMN,4,Nlyear
  64. COLUMN,5,Currencytype
  65. COLUMN,6,Broughtforward
  66. COLUMN,7,Currentpostings
  67. COLUMN,8,Futurepostings
  68. COLUMN,9,Adjustmentflag
  69. COLUMN,10,Adjustment
  70. COLUMN,11,Groupdrbroughtfwd
  71. COLUMN,12,Groupcrbroughtfwd
  72. COLUMN,13,Groupdrcurrent
  73. COLUMN,14,Groupcrcurrent
  74. COLUMN,15,Groupdrfuture
  75. COLUMN,16,Groupcrfuture
  76. COLUMN,17,Groupdradjustments
  77. COLUMN,18,Groupcradjustments
  78. COLUMN,19,Client Db
  79. COLUMN,20,Bookkeep Date
  80. COLUMN,21,Rechtseinheit_ID
  81. COLUMN,22,Description002_Expense_Code_Kto_Bez
  82. COLUMN,23,Accounttype_Expense_Code
  83. COLUMN,24,Costcentre_Department
  84. COLUMN,25,Shortname_Department
  85. COLUMN,26,Description001_Department
  86. COLUMN,27,Description002_Department
  87. COLUMN,28,Description003_Department
  88. COLUMN,29,Description004_Department
  89. COLUMN,30,Costcentregroup_Department
  90. COLUMN,31,Costcentregroup_Costcentergr
  91. COLUMN,32,Description001_Costcentergr
  92. COLUMN,33,Description002_Costcentergr
  93. COLUMN,34,Description003_Costcentergr
  94. COLUMN,35,Description004_Costcentergr
  95. COLUMN,36,Locationcode_GB_company
  96. COLUMN,37,Description_GB_company
  97. COLUMN,38,Locationname_GB_company
  98. COLUMN,39,Rechtseinheit_Name
  99. COLUMN,40,Standort_ID
  100. COLUMN,41,Standort_Name
  101. COLUMN,42,Acct Nr
  102. COLUMN,43,Text
  103. COLUMN,44,Kostenstelle
  104. COLUMN,45,KST_Detail
  105. COLUMN,46,Datum_Zeichen_alt
  106. COLUMN,47,Basevalue
  107. COLUMN,48,Datum_Zahl