Zeit_Stempelungen_neu.iqd 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. COGNOS QUERY
  2. STRUCTURE,1,1
  3. DATABASE,Locosoft_GC
  4. DATASOURCENAME,C:\GlobalCube\System\LOCOSOFT\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. T3."Order Number" as c13,
  20. T2."end_time" as c14,
  21. T2."exact_duration_seconds" / 60 as c15,
  22. T4."type" as c16,
  23. T4."description" as c17,
  24. T2."start_time" as c18,
  25. '1' as c19,
  26. '0' || (rtrim((cast_numberToString(cast_integer(T1."subsidiary"))))) as c20,
  27. (rtrim((cast_numberToString(cast_integer(T1."employee_number"))))) || ' - ' || T1."name" as c21,
  28. CASE WHEN (T4."type" = 1) THEN ((T2."exact_duration_seconds" / 60) / 60) ELSE (0) END as c22,
  29. CASE WHEN (T4."type" = 2) THEN ((T2."exact_duration_seconds" / 60) / 60) ELSE (0) END as c23,
  30. CASE WHEN (T4."type" = 1) THEN ((T2."exact_duration_seconds" / 60) / 60) ELSE (0) END as c24,
  31. CASE WHEN (T2."type" = 2) THEN ('produktiv') ELSE ('unproduktiv') END as c25,
  32. '' as c26,
  33. (T2."exact_duration_seconds" / 60) / 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" T4 on T2."type" = T4."type") left outer join QSS."C:\GlobalCube\System\LOCOSOFT\IQD\Serv_Teile\offene_Auftraege_Ums_ben_AW_fuer_Monteure.ims" T3 on T3."order_number" = T2."order_number")
  40. where (T1."employee_number" = T2."employee_number")
  41. order by c1 asc,c11 asc,c10 asc
  42. END SQL
  43. COLUMN,0,Employee Number_Employees
  44. COLUMN,1,Name_Employees
  45. COLUMN,2,Initials_Employees
  46. COLUMN,3,Mechanic Number_Employees
  47. COLUMN,4,Salesman Number_Employees
  48. COLUMN,5,Employment Date_Employees
  49. COLUMN,6,Termination Date_Employees
  50. COLUMN,7,Leave Date_Employees
  51. COLUMN,8,Employee Number_Times
  52. COLUMN,9,Order Number_Times
  53. COLUMN,10,Start Time_Times
  54. COLUMN,11,Type_Times
  55. COLUMN,12,Order Positions_Times
  56. COLUMN,13,End Time_Times
  57. COLUMN,14,Duration Minutes_Times
  58. COLUMN,15,Type_Time_Types
  59. COLUMN,16,Description_Time_Types
  60. COLUMN,17,Datum
  61. COLUMN,18,Hauptbetrieb
  62. COLUMN,19,Standort
  63. COLUMN,20,Monteur
  64. COLUMN,21,Anwesenheit
  65. COLUMN,22,produktiv
  66. COLUMN,23,unproduktiv
  67. COLUMN,24,Zeitkategorie
  68. COLUMN,25,Zeitkategorie2
  69. COLUMN,26,Ges. Std.
  70. COLUMN,27,Order Number
  71. COLUMN,28,Wochentag_Datum
  72. COLUMN,29,Is Flextime_Employees
  73. COLUMN,30,Break Time Registration_Employees