Zeit_verk_Std.iqd 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. COGNOS QUERY
  2. STRUCTURE,1,1
  3. DATABASE,Locosoft_GC
  4. DATASOURCENAME,C:\GlobalCube\System\LOCOSOFT\IQD\zeit\Zeit_verk_Std.imr
  5. TITLE,Zeit_verk_Std.imr
  6. BEGIN SQL
  7. select T1."order_number" as c1,
  8. T1."order_position" as c2,
  9. T1."labour_type" as c3,
  10. T2."code" as c4,
  11. T2."description" as c5,
  12. T3."order_number" as c6,
  13. T3."order_position" as c7,
  14. T3."order_position_line" as c8,
  15. '0' || (rtrim((cast_numberToString(cast_integer(T4."subsidiary"))))) as c9,
  16. T3."is_invoiced" as c10,
  17. T3."invoice_type" as c11,
  18. T3."invoice_number" as c12,
  19. T3."employee_no" as c13,
  20. T3."mechanic_no" as c14,
  21. T3."labour_operation_id" as c15,
  22. T3."is_nominal" as c16,
  23. T3."net_price_in_order" as c17,
  24. T3."rebate_percent" as c18,
  25. T3."goodwill_percent" as c19,
  26. T3."charge_type" as c20,
  27. T3."text_line" as c21,
  28. 10 as c22,
  29. ((cast_float(T3."time_units"))) / 10 as c23,
  30. 'verk. Std.' as c24,
  31. '' as c25,
  32. T4."employee_number" as c26,
  33. T4."name" as c27,
  34. (rtrim((cast_numberToString(cast_integer(T4."employee_number"))))) || ' - ' || T4."name" as c28,
  35. T5."invoice_number" as c29,
  36. T5."invoice_date" as c30,
  37. T5."invoice_date" as c31,
  38. T3."time_units" as c32,
  39. (cast_float(T3."time_units")) as c33
  40. from ("dbo"."invoices" T5 left outer join ((("dbo"."order_positions" T1 left outer join "dbo"."labour_types" T2 on T1."labour_type" = T2."code") left outer join "dbo"."labours" T3 on T1."order_number" = T3."order_number") left outer join "dbo"."employees" T4 on T3."mechanic_no" = T4."employee_number") on (T3."invoice_number" = T5."invoice_number") and (T3."invoice_type" = T5."invoice_type"))
  41. where (((cast_float(T3."time_units"))) <> 0)
  42. order by c1 asc,c2 asc
  43. END SQL
  44. COLUMN,0,Order Number
  45. COLUMN,1,Order Position
  46. COLUMN,2,Labour Type
  47. COLUMN,3,Code_Labour_Types
  48. COLUMN,4,Description_Labour_Types
  49. COLUMN,5,Order Number_Labours
  50. COLUMN,6,Order Position_Labours
  51. COLUMN,7,Order Position Line_Labours
  52. COLUMN,8,Subsidiary_Labours
  53. COLUMN,9,Is Invoiced_Labours
  54. COLUMN,10,Invoice Type_Labours
  55. COLUMN,11,Invoice Number_Labours
  56. COLUMN,12,Employee No_Labours
  57. COLUMN,13,Mechanic No_Labours
  58. COLUMN,14,Labour Operation Id_Labours
  59. COLUMN,15,Is Nominal_Labours
  60. COLUMN,16,Net Price In Order_Labours
  61. COLUMN,17,Rebate Percent_Labours
  62. COLUMN,18,Goodwill Percent_Labours
  63. COLUMN,19,Charge Type_Labours
  64. COLUMN,20,Text Line_Labours
  65. COLUMN,21,AW/Std.
  66. COLUMN,22,verk. Std.
  67. COLUMN,23,Zeitkategorie
  68. COLUMN,24,Zeitkategorie2
  69. COLUMN,25,Employee Number_Employee
  70. COLUMN,26,Name_Employee
  71. COLUMN,27,Monteur
  72. COLUMN,28,Invoice Number_Invoices
  73. COLUMN,29,Invoice Date_Invoices
  74. COLUMN,30,Datum
  75. COLUMN,31,Time Units_Labours
  76. COLUMN,32,Time_Units_Zahl