Belege_Autoline.iqd 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. COGNOS QUERY
  2. STRUCTURE,1,1
  3. DATABASE,GC_AUTOLINE
  4. DATASOURCENAME,C:\GlobalCube\System\Autoline\IQD\belege\Belege_Autoline.imr
  5. TITLE,Belege_Autoline.imr
  6. BEGIN SQL
  7. select T1."CostCentre" as c1,
  8. T1."ExpenseCode" as c2,
  9. T1."Suffix" as c3,
  10. T1."AccountsModule" as c4,
  11. T1."DaybookNumber" as c5,
  12. T1."ItemNumber" as c6,
  13. T1."PostingDate" as c7,
  14. T1."AccountsCompany" as c8,
  15. T1."SLPLAccountCode" as c9,
  16. T1."Period" as c10,
  17. T1."JournalReference" as c11,
  18. T1."Narrative" as c12,
  19. T1."Year" as c13,
  20. T1."BaseValue" as c14,
  21. T1."CurrencyValue" as c15,
  22. T1."SequenceNumber" as c16,
  23. T1."Reconciled" as c17,
  24. T1."JournalType" as c18,
  25. T1."TransferBatch" as c19,
  26. T1."GroupDrValue" as c20,
  27. T1."GroupCrValue" as c21,
  28. T1."CurrencyLogSerial" as c22,
  29. T1."SourceCompany" as c23,
  30. T1."StatementDate" as c24,
  31. T1."SourceModule" as c25,
  32. T1."VATCode" as c26,
  33. T1."LegalAnalytic" as c27,
  34. T1."LatinSequence" as c28,
  35. T1."LatinSequenceLine" as c29,
  36. T1."ReconciledDate" as c30,
  37. T1."ReconciledTime" as c31,
  38. T1."ReconciledUser" as c32,
  39. T1."ChequeValueDate" as c33,
  40. T1."DocumentNumber" as c34,
  41. T1."JournalClass" as c35,
  42. T1."JournalSeqType" as c36,
  43. T1."VATGroup" as c37,
  44. T1."CustomerReference" as c38,
  45. T1."ReconciledReference" as c39,
  46. T1."CashFlowGroup" as c40,
  47. T1."CashFlowCode" as c41,
  48. T1."ConsSourceCompany" as c42,
  49. T1."ConsSourceDaybook" as c43,
  50. T1."BranchCode" as c44,
  51. T1."DocumentDate" as c45,
  52. T1."Client_DB" as c46,
  53. T1."AccountCode" as c47,
  54. T1."PostingDate" as c48,
  55. T1."Client_DB" as c49,
  56. T2."Description002" as c50,
  57. T2."AccountType" as c51,
  58. T3."CostCentre" as c52,
  59. T3."ShortName" as c53,
  60. T3."Description001" as c54,
  61. T3."Description002" as c55,
  62. T3."Description003" as c56,
  63. T3."Description004" as c57,
  64. T3."CostCentreGroup" as c58,
  65. T4."CostCentreGroup" as c59,
  66. T4."Description001" as c60,
  67. T4."Description002" as c61,
  68. T4."Description003" as c62,
  69. T4."Description004" as c63,
  70. T5."LocationCode" as c64,
  71. T5."Description" as c65,
  72. T5."LocationName" as c66,
  73. '' as c67,
  74. T5."LocationCode" as c68,
  75. T5."LocationCode" || ' - ' || T5."Description" as c69,
  76. T1."ExpenseCode" as c70,
  77. CASE WHEN ((extract(DAY FROM (now()) - T1."PostingDate")) <= 180) THEN ((rtrim((cast_numberToString(cast_integer(T1."DocumentNumber"))))) || ' - ' || T1."JournalClass" || ' - ' || T1."CustomerReference") ELSE ('Belege älter 180 Tage') END as c71,
  78. T4."CostCentreGroup" || ' - ' || T4."Description002" as c72,
  79. (rtrim((cast_numberToString(cast_integer(T3."CostCentre"))))) || ' - ' || T3."Description002" as c73
  80. from (((("AUTOLINE"."import"."NL_NominalTransactionFile" T1 left outer join "AUTOLINE"."import"."NL_NominalExpenseCodes" T2 on (T2."ExpenseCode" = T1."ExpenseCode") and (T2."Client_DB" = T1."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")
  81. where ((T2."AccountType" = 'P') and (not T3."CostCentreGroup" LIKE '9%'))
  82. order by c3 asc
  83. END SQL
  84. COLUMN,0,Costcentre
  85. COLUMN,1,Expensecode
  86. COLUMN,2,Suffix
  87. COLUMN,3,Accountsmodule
  88. COLUMN,4,Daybooknumber
  89. COLUMN,5,Itemnumber
  90. COLUMN,6,Postingdate
  91. COLUMN,7,Accountscompany
  92. COLUMN,8,Slplaccountcode
  93. COLUMN,9,Period
  94. COLUMN,10,Journalreference
  95. COLUMN,11,Narrative
  96. COLUMN,12,Year
  97. COLUMN,13,Basevalue
  98. COLUMN,14,Currencyvalue
  99. COLUMN,15,Sequencenumber
  100. COLUMN,16,Reconciled
  101. COLUMN,17,Journaltype
  102. COLUMN,18,Transferbatch
  103. COLUMN,19,Groupdrvalue
  104. COLUMN,20,Groupcrvalue
  105. COLUMN,21,Currencylogserial
  106. COLUMN,22,Sourcecompany
  107. COLUMN,23,Statementdate
  108. COLUMN,24,Sourcemodule
  109. COLUMN,25,Vatcode
  110. COLUMN,26,Legalanalytic
  111. COLUMN,27,Latinsequence
  112. COLUMN,28,Latinsequenceline
  113. COLUMN,29,Reconcileddate
  114. COLUMN,30,Reconciledtime
  115. COLUMN,31,Reconcileduser
  116. COLUMN,32,Chequevaluedate
  117. COLUMN,33,Documentnumber
  118. COLUMN,34,Journalclass
  119. COLUMN,35,Journalseqtype
  120. COLUMN,36,Vatgroup
  121. COLUMN,37,Customerreference
  122. COLUMN,38,Reconciledreference
  123. COLUMN,39,Cashflowgroup
  124. COLUMN,40,Cashflowcode
  125. COLUMN,41,Conssourcecompany
  126. COLUMN,42,Conssourcedaybook
  127. COLUMN,43,Branchcode
  128. COLUMN,44,Documentdate
  129. COLUMN,45,Client Db
  130. COLUMN,46,Accountcode
  131. COLUMN,47,Bookkeep Date
  132. COLUMN,48,Rechtseinheit_ID
  133. COLUMN,49,Description002_Expense_Code_Kto_Bez
  134. COLUMN,50,Accounttype_Expense_Code
  135. COLUMN,51,Costcentre_Department
  136. COLUMN,52,Shortname_Department
  137. COLUMN,53,Description001_Department
  138. COLUMN,54,Description002_Department
  139. COLUMN,55,Description003_Department
  140. COLUMN,56,Description004_Department
  141. COLUMN,57,Costcentregroup_Department
  142. COLUMN,58,Costcentregroup_Costcentergr
  143. COLUMN,59,Description001_Costcentergr
  144. COLUMN,60,Description002_Costcentergr
  145. COLUMN,61,Description003_Costcentergr
  146. COLUMN,62,Description004_Costcentergr
  147. COLUMN,63,Locationcode_GB_company
  148. COLUMN,64,Description_GB_company
  149. COLUMN,65,Locationname_GB_company
  150. COLUMN,66,Rechtseinheit_Name
  151. COLUMN,67,Standort_ID
  152. COLUMN,68,Standort_Name
  153. COLUMN,69,Acct Nr
  154. COLUMN,70,Text
  155. COLUMN,71,Kostenstelle
  156. COLUMN,72,KST_Detail