COGNOS QUERY STRUCTURE,1,1 DATABASE,Locosoft_GC DATASOURCENAME,C:\GlobalCube\System\LOCOSOFT\IQD\Serv_Teile\Imvoice_No_Order_No.imr TITLE,Imvoice_No_Order_No.imr BEGIN SQL select distinct T1."order_number" as c1, T1."invoice_number" as c2, T2."invoice_type" as c3, (od_left((cast_numberToString(cast_integer(T2."invoice_type"))),1)) || (od_left((cast_numberToString(cast_integer(T1."invoice_number"))),6)) as c4 from ("dbo"."invoices" T2 left outer join "dbo"."labours" T1 on (T1."invoice_number" = T2."invoice_number") and (T1."invoice_type" = T2."invoice_type")) where ((((od_left((cast_numberToString(cast_integer(T2."invoice_type"))),1)) || (od_left((cast_numberToString(cast_integer(T1."invoice_number"))),6))) <> '') and (T2."invoice_date" >= DATE '2019-01-01')) order by c1 asc END SQL COLUMN,0,Order Number COLUMN,1,Invoice Number_ohne_type COLUMN,2,Invoice Type COLUMN,3,Invoice Number