Zeit_Stempelungen_neu.iqd 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. COGNOS QUERY
  2. STRUCTURE,1,1
  3. DATABASE,Locosoft_GC
  4. DATASOURCENAME,C:\Gaps_Locosoft_neu\Portal\System\IQD\Zeit\Zeit_Stempelungen_neu.imr
  5. TITLE,Zeit_Stempelungen_neu.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. T2."employee_number" as c9,
  16. T2."order_number" as c10,
  17. T2."start_time" as c11,
  18. T2."type" as c12,
  19. T2."order_positions" as c13,
  20. T2."end_time" as c14,
  21. T2."duration_minutes" as c15,
  22. T3."type" as c16,
  23. T3."description" as c17,
  24. T2."start_time" as c18,
  25. '1' as c19,
  26. '01' as c20,
  27. (rtrim((cast_numberToString(cast_integer(T1."employee_number"))))) || ' - ' || T1."name" as c21,
  28. CASE WHEN (T3."type" = 1) THEN (T2."duration_minutes" / 60) ELSE (0) END as c22,
  29. CASE WHEN (T3."type" = 2) THEN (T2."duration_minutes" / 60) ELSE (0) END as c23,
  30. CASE WHEN (T3."type" = 1) THEN (T2."duration_minutes" / 60) ELSE (0) END as c24,
  31. CASE WHEN (T2."type" = 2) THEN ('produktiv') ELSE ('unproduktiv') END as c25,
  32. '' as c26,
  33. T2."duration_minutes" / 60 as c27,
  34. T2."order_number" as c28,
  35. (dayofweek(T2."start_time")) as c29,
  36. T1."is_flextime" as c30,
  37. T1."break_time_registration" as c31
  38. from "dbo"."employees" T1,
  39. ("dbo"."times" T2 left outer join "dbo"."time_types" T3 on T2."type" = T3."type")
  40. where (T1."employee_number" = T2."employee_number")
  41. and (T1."mechanic_number" IS NOT NULL)
  42. order by c1 asc,c11 asc,c10 asc
  43. END SQL
  44. COLUMN,0,Employee Number_Employees
  45. COLUMN,1,Name_Employees
  46. COLUMN,2,Initials_Employees
  47. COLUMN,3,Mechanic Number_Employees
  48. COLUMN,4,Salesman Number_Employees
  49. COLUMN,5,Employment Date_Employees
  50. COLUMN,6,Termination Date_Employees
  51. COLUMN,7,Leave Date_Employees
  52. COLUMN,8,Employee Number_Times
  53. COLUMN,9,Order Number_Times
  54. COLUMN,10,Start Time_Times
  55. COLUMN,11,Type_Times
  56. COLUMN,12,Order Positions_Times
  57. COLUMN,13,End Time_Times
  58. COLUMN,14,Duration Minutes_Times
  59. COLUMN,15,Type_Time_Types
  60. COLUMN,16,Description_Time_Types
  61. COLUMN,17,Datum
  62. COLUMN,18,Hauptbetrieb
  63. COLUMN,19,Standort
  64. COLUMN,20,Monteur
  65. COLUMN,21,Anwesenheit
  66. COLUMN,22,produktiv
  67. COLUMN,23,unproduktiv
  68. COLUMN,24,Zeitkategorie
  69. COLUMN,25,Zeitkategorie2
  70. COLUMN,26,Ges. Std.
  71. COLUMN,27,Order Number
  72. COLUMN,28,Wochentag_Datum
  73. COLUMN,29,Is Flextime_Employees
  74. COLUMN,30,Break Time Registration_Employees