COGNOS QUERY STRUCTURE,1,1 DATABASE,GC_AUTOLINE DATASOURCENAME,C:\GlobalCube\System\Autoline\IQD\belege\Belege_Autoline_History.imr TITLE,Belege_Autoline_History.imr BEGIN SQL select T1."AccountCode" as c1, T1."CostCentre" as c2, T1."ExpenseCode" as c3, T1."NLPeriod" as c4, T1."NLYear" as c5, T1."CurrencyType" as c6, T1."BroughtForward" as c7, T1."CurrentPostings" as c8, T1."FuturePostings" as c9, T1."AdjustmentFlag" as c10, T1."Adjustment" as c11, T1."GroupDrBroughtFwd" as c12, T1."GroupCrBroughtFwd" as c13, T1."GroupDrCurrent" as c14, T1."GroupCrCurrent" as c15, T1."GroupDrFuture" as c16, T1."GroupCrFuture" as c17, T1."GroupDrAdjustments" as c18, T1."GroupCrAdjustments" as c19, T1."Client_DB" as c20, ((cinteger(nconvert(((rtrim((cast_numberToString(cast_integer(T1."NLYear"))))) || (asciiz(round(T1."NLPeriod",0,0),2)) || '28')),0))) as c21, T1."Client_DB" as c22, T2."Description002" as c23, T2."AccountType" as c24, T3."CostCentre" as c25, T3."ShortName" as c26, T3."Description001" as c27, T3."Description002" as c28, T3."Description003" as c29, T3."Description004" as c30, T3."CostCentreGroup" as c31, T4."CostCentreGroup" as c32, T4."Description001" as c33, T4."Description002" as c34, T4."Description003" as c35, T4."Description004" as c36, T5."LocationCode" as c37, T5."Description" as c38, T5."LocationName" as c39, '' as c40, T5."LocationCode" as c41, T5."LocationCode" || ' - ' || T5."Description" as c42, T1."ExpenseCode" as c43, '' as c44, T4."CostCentreGroup" || ' - ' || T4."Description002" as c45, (rtrim((cast_numberToString(cast_integer(T3."CostCentre"))))) || ' - ' || T3."Description002" as c46, (rtrim((cast_numberToString(cast_integer(T1."NLYear"))))) || (asciiz(round(T1."NLPeriod",0,0),2)) || '28' as c47, T1."CurrentPostings" as c48, (cinteger(nconvert(((rtrim((cast_numberToString(cast_integer(T1."NLYear"))))) || (asciiz(round(T1."NLPeriod",0,0),2)) || '28')),0)) as c49 from (((("AUTOLINE"."import"."NL_NominalAccountHistoryFile" T1 left outer join "AUTOLINE"."import"."NL_NominalExpenseCodes" T2 on (T1."ExpenseCode" = T2."ExpenseCode") and (T1."Client_DB" = T2."Client_DB")) left outer join "AUTOLINE"."import"."NL_NominalDepartmentCodes" T3 on (T1."CostCentre" = T3."CostCentre") and (T1."Client_DB" = T3."Client_DB")) left outer join "AUTOLINE"."import"."NL_DepartmentCodeGroups" T4 on (T3."CostCentreGroup" = T4."CostCentreGroup") and (T3."Client_DB" = T4."Client_DB")) left outer join "AUTOLINE"."import"."GB_CompanyLocations" T5 on (od_left((cast_numberToString(cast_integer(T1."CostCentre"))),2)) = T5."LocationCode") where (((T2."AccountType" = 'P') and (not T3."CostCentreGroup" LIKE '9%')) and (T1."NLYear" > 2018)) END SQL COLUMN,0,Accountcode COLUMN,1,Costcentre COLUMN,2,Expensecode COLUMN,3,Nlperiod COLUMN,4,Nlyear COLUMN,5,Currencytype COLUMN,6,Broughtforward COLUMN,7,Currentpostings COLUMN,8,Futurepostings COLUMN,9,Adjustmentflag COLUMN,10,Adjustment COLUMN,11,Groupdrbroughtfwd COLUMN,12,Groupcrbroughtfwd COLUMN,13,Groupdrcurrent COLUMN,14,Groupcrcurrent COLUMN,15,Groupdrfuture COLUMN,16,Groupcrfuture COLUMN,17,Groupdradjustments COLUMN,18,Groupcradjustments COLUMN,19,Client Db COLUMN,20,Bookkeep Date COLUMN,21,Rechtseinheit_ID COLUMN,22,Description002_Expense_Code_Kto_Bez COLUMN,23,Accounttype_Expense_Code COLUMN,24,Costcentre_Department COLUMN,25,Shortname_Department COLUMN,26,Description001_Department COLUMN,27,Description002_Department COLUMN,28,Description003_Department COLUMN,29,Description004_Department COLUMN,30,Costcentregroup_Department COLUMN,31,Costcentregroup_Costcentergr COLUMN,32,Description001_Costcentergr COLUMN,33,Description002_Costcentergr COLUMN,34,Description003_Costcentergr COLUMN,35,Description004_Costcentergr COLUMN,36,Locationcode_GB_company COLUMN,37,Description_GB_company COLUMN,38,Locationname_GB_company COLUMN,39,Rechtseinheit_Name COLUMN,40,Standort_ID COLUMN,41,Standort_Name COLUMN,42,Acct Nr COLUMN,43,Text COLUMN,44,Kostenstelle COLUMN,45,KST_Detail COLUMN,46,Datum_Zeichen_alt COLUMN,47,Basevalue COLUMN,48,Datum_Zahl