123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- COGNOS QUERY
- STRUCTURE,1,1
- DATABASE,Locosoft_GC
- DATASOURCENAME,C:\Gaps_Locosoft_neu\Portal\System\IQD\Zeit\Zeit_ben_Std_LG.imr
- TITLE,Zeit_ben_Std_LG.imr
- BEGIN SQL
- select distinct c1 as c1,
- c2 as c2,
- c3 as c3,
- c4 as c4,
- c5 as c5,
- c6 as c6,
- c7 as c7,
- c8 as c8,
- c9 as c9,
- c10 as c10,
- c11 as c11,
- c12 as c12,
- c13 as c13,
- c14 as c14,
- c15 as c15,
- c16 as c16,
- c17 as c17,
- c18 as c18,
- c19 as c19,
- c20 as c20,
- c21 as c21,
- c22 as c22,
- c23 as c23,
- c24 as c24,
- XMIN(c15 for c1,c8) as c25
- from
- (select c31 as c1,
- c49 as c2,
- c48 as c3,
- c47 as c4,
- c46 as c5,
- c45 as c6,
- c44 as c7,
- c30 as c8,
- 10 as c9,
- 'ben. Std.' as c10,
- '' as c11,
- c43 as c12,
- c42 as c13,
- c41 as c14,
- c40 as c15,
- c40 as c16,
- c39 as c17,
- c38 as c18,
- c37 as c19,
- c36 as c20,
- c35 as c21,
- c34 as c22,
- c33 as c23,
- c32 as c24,
- XMIN(c40 for c31,c30) as c26
- from
- (select T3."mechanic_no" as c30,
- T1."order_number" as c31,
- T6."end_time" as c32,
- T6."start_time" as c33,
- T5."cancelation_date" as c34,
- T5."cancelation_number" as c35,
- T5."is_canceled" as c36,
- T3."invoice_number" as c37,
- T6."duration_minutes" / 60 as c38,
- T6."duration_minutes" as c39,
- T5."invoice_date" as c40,
- (rtrim((cast_numberToString(cast_integer(T4."employee_number"))))) || ' - ' || T4."name" as c41,
- T4."name" as c42,
- T4."employee_number" as c43,
- T3."invoice_type" as c44,
- T3."subsidiary" as c45,
- T3."order_number" as c46,
- T2."description" as c47,
- T2."code" as c48,
- T1."labour_type" as c49
- from "LOCOSOFT"."dbo"."times" T6,
- ("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") and (T1."order_position" = T3."order_position")) 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"))
- where ((T3."order_number" = T6."order_number") and (T3."mechanic_no" = T6."employee_number"))
- and (((cast_float(T3."time_units"))) <> 0)
- ) D2
- ) D1
- where (c26 = c15)
- order by c1 asc,c8 asc,c23 asc
- END SQL
- COLUMN,0,Order Number
- COLUMN,1,Labour Type
- COLUMN,2,Code_Labour_Types
- COLUMN,3,Description_Labour_Types
- COLUMN,4,Order Number_Labours
- COLUMN,5,Subsidiary_Labours
- COLUMN,6,Invoice Type_Labours
- COLUMN,7,Mechanic No_Labours
- COLUMN,8,AW/Std.
- COLUMN,9,Zeitkategorie
- COLUMN,10,Zeitkategorie2
- COLUMN,11,Employee Number_Employee
- COLUMN,12,Name_Employee
- COLUMN,13,Monteur
- COLUMN,14,Invoice Date_Invoices
- COLUMN,15,Datum
- COLUMN,16,Duration Minutes_Times
- COLUMN,17,ben. Std.
- COLUMN,18,Invoice Number
- COLUMN,19,Is Canceled
- COLUMN,20,Cancelation Number
- COLUMN,21,Cancelation Date
- COLUMN,22,Start Time
- COLUMN,23,End Time
- COLUMN,24,Min_Invoice_Date
|