Zeit_Sollzeit.iqd 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. COGNOS QUERY
  2. STRUCTURE,1,1
  3. DATABASE,Locosoft_GC
  4. DATASOURCENAME,C:\GlobalCube\System\LOCOSOFT\IQD\zeit\Zeit_Sollzeit.imr
  5. TITLE,Zeit_Sollzeit.imr
  6. BEGIN SQL
  7. select T1."employee_number" as c1,
  8. T1."name" as c2,
  9. T1."initials" as c3,
  10. T1."mechanic_number" as c4,
  11. T1."salesman_number" as c5,
  12. T1."employment_date" as c6,
  13. T1."termination_date" as c7,
  14. T1."leave_date" as c8,
  15. '1' as c9,
  16. '01' as c10,
  17. (rtrim((cast_numberToString(cast_integer(T1."employee_number"))))) || ' - ' || T1."name" as c11,
  18. 'Sollzeit' as c12,
  19. '' as c13,
  20. T2."is_latest_record" as c14,
  21. T2."employee_number" as c15,
  22. T2."validity_date" as c16,
  23. T2."dayofweek" as c17,
  24. T2."work_duration" as c18,
  25. T2."worktime_start" as c19,
  26. T2."worktime_end" as c20,
  27. T3."datum" as c21,
  28. T3."wochentage_id" as c22,
  29. T2."work_duration" as c23,
  30. T3."datum" as c24,
  31. '1' as c25,
  32. 'AH Lutz' as c26,
  33. '01' as c27,
  34. 'FFB' as c28,
  35. 'Monteure' as c29,
  36. 'Monteure' as c30,
  37. 'Sollzeit' as c31,
  38. '' as c32,
  39. 'Sollzeit' as c33
  40. from "dbo"."employees" T1,
  41. "LOCOSOFT"."dbo"."employees_worktimes" T2,
  42. QSS."C:\GlobalCube\System\LOCOSOFT\IQD\Belege\current_date_fuer_ims.ims" T3
  43. where (T1."employee_number" = T2."employee_number")
  44. and (((T3."arbeitstag_mofr" = 1) and (T2."dayofweek" = (cinteger(nconvert(T3."wochentage_id"),0)))) and (T3."datum" >= TIMESTAMP '2023-05-01 00:00:00.000'))
  45. order by c1 asc,c21 asc
  46. END SQL
  47. COLUMN,0,Employee Number_Employees
  48. COLUMN,1,Name_Employees
  49. COLUMN,2,Initials_Employees
  50. COLUMN,3,Mechanic Number_Employees
  51. COLUMN,4,Salesman Number_Employees
  52. COLUMN,5,Employment Date_Employees
  53. COLUMN,6,Termination Date_Employees
  54. COLUMN,7,Leave Date_Employees
  55. COLUMN,8,Hauptbetrieb
  56. COLUMN,9,Standort
  57. COLUMN,10,Monteur
  58. COLUMN,11,Zeitkategorie
  59. COLUMN,12,Zeitkategorie2
  60. COLUMN,13,Is Latest Record
  61. COLUMN,14,Employee Number
  62. COLUMN,15,Validity Date
  63. COLUMN,16,Dayofweek
  64. COLUMN,17,Work Duration
  65. COLUMN,18,Worktime Start
  66. COLUMN,19,Worktime End
  67. COLUMN,20,Datum
  68. COLUMN,21,Wochentage Id
  69. COLUMN,22,Soll-Zeit
  70. COLUMN,23,Invoice Date
  71. COLUMN,24,Hauptbetrieb_ID
  72. COLUMN,25,Hauptbetrieb_Name
  73. COLUMN,26,Standort_ID
  74. COLUMN,27,Standort_Name
  75. COLUMN,28,Monteur_Gruppe
  76. COLUMN,29,Monteur_Gruppe_2
  77. COLUMN,30,Activity_Codes_Group1
  78. COLUMN,31,Activity_Codes_Group2
  79. COLUMN,32,Activity_Desc