Zeit_Stempelungen.iqd 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. COGNOS QUERY
  2. STRUCTURE,1,1
  3. DATABASE,Locosoft
  4. DATASOURCENAME,C:\GAPS_Locosoft\Portal\System\IQD\Zeit\Zeit_Stempelungen.imr
  5. TITLE,Zeit_Stempelungen
  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. (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. from "dbo"."employees" T1,
  36. ("dbo"."times" T2 left outer join "dbo"."time_types" T3 on T2."type" = T3."type")
  37. where (T1."employee_number" = T2."employee_number")
  38. and (T1."mechanic_number" IS NOT NULL)
  39. order by c1 asc,c11 asc,c10 asc
  40. END SQL
  41. COLUMN,0,Employee Number_Employees
  42. COLUMN,1,Name_Employees
  43. COLUMN,2,Initials_Employees
  44. COLUMN,3,Mechanic Number_Employees
  45. COLUMN,4,Salesman Number_Employees
  46. COLUMN,5,Employment Date_Employees
  47. COLUMN,6,Termination Date_Employees
  48. COLUMN,7,Leave Date_Employees
  49. COLUMN,8,Employee Number_Times
  50. COLUMN,9,Order Number_Times
  51. COLUMN,10,Start Time_Times
  52. COLUMN,11,Type_Times
  53. COLUMN,12,Order Positions_Times
  54. COLUMN,13,End Time_Times
  55. COLUMN,14,Duration Minutes_Times
  56. COLUMN,15,Type_Time_Types
  57. COLUMN,16,Description_Time_Types
  58. COLUMN,17,Datum
  59. COLUMN,18,Hauptbetrieb
  60. COLUMN,19,Standort
  61. COLUMN,20,Monteur
  62. COLUMN,21,Anwesenheit
  63. COLUMN,22,produktiv
  64. COLUMN,23,unproduktiv
  65. COLUMN,24,Zeitkategorie
  66. COLUMN,25,Zeitkategorie2
  67. COLUMN,26,Ges. Std.
  68. COLUMN,27,Order Number