123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- COGNOS QUERY
- STRUCTURE,1,1
- DATABASE,O21
- DATASOURCENAME,C:\GAPS\Portal\System\IQD\Belege\GuV_8_O21_2008.imr
- TITLE,GuV_8_O21_2008.imr
- BEGIN SQL
- select T1."ACCT_NR" as c1,
- T1."LEDGER_ACCTS_NAME" as c2,
- T1."LEDGER_ACCTS_NAME2" as c3,
- T1."HANDLER" as c4,
- T1."DEPT_SPLIT" as c5,
- T1."TYPE_ACCTT" as c6,
- T2."DEPARTMENT_TYPE_ID" as c7,
- T2."DESCRIPTION" as c8,
- T2."DEPARTMENT_GROUP" as c9,
- T3."AA_TRTYPE_ID" as c10,
- T3."DESCRIPTION" as c11,
- T3."OWN_DESCRIPTION" as c12,
- '1' as c13,
- (od_left(T2."DEPARTMENT_TYPE_ID",2)) as c14,
- (substring(T2."DEPARTMENT_TYPE_ID" from 3 for 1)) as c15,
- '' as c16,
- CASE WHEN ((((T1."ACCT_NR" LIKE '8%') and (not T1."ACCT_NR" BETWEEN '89050000' AND '89500001')) and (not T1."ACCT_NR" BETWEEN '8812000' AND '8812002')) or ((T1."ACCT_NR" LIKE '9%') and (T1."ACCT_NR" <> '99999999'))) THEN ((T4."DEBIT_AMOUNT" + T4."CREDIT_AMOUNT") * -1) ELSE (T4."DEBIT_AMOUNT" + T4."CREDIT_AMOUNT") END as c17,
- (database()) as c18,
- '' as c19,
- T4."ACCT_NO" as c20,
- T4."BOOKKEEP_DATE" as c21,
- T4."BOOKKEEP_PERIOD" as c22,
- T4."DOCUMENT_NO" as c23,
- T4."BOOK_NO" as c24,
- T4."STATUS" as c25,
- T4."DEBIT_AMOUNT" as c26,
- T4."CREDIT_AMOUNT" as c27,
- T4."DEBIT_QUANTITY" as c28,
- T4."CREDIT_QUANTITY" as c29,
- T4."AA_TRTYPE" as c30,
- T4."DEPARTMENT" as c31,
- T4."STOCK" as c32,
- T4."MAKE_FAMILY" as c33,
- T4."MAKE" as c34,
- T4."VEHICLE_TYPE" as c35,
- T4."MODEL_LINE" as c36,
- T4."FACTORY_MODEL" as c37,
- T4."WORKSHOP_MODEL" as c38,
- T4."PRODUCT_GROUP" as c39,
- T4."REPAIR_GROUP" as c40,
- T4."KIT_GROUP" as c41,
- T4."TIME_CODE" as c42,
- T4."INT_VOUCHER_NO" as c43,
- T4."BALANCING_MARK" as c44,
- T4."USED_VEH_DEST_CODE" as c45,
- T4."USE_OF_VEHICLE" as c46,
- T4."ACCT_NO_NEXT_CHART" as c47,
- T4."DEBIT_QUANTITY" + T4."CREDIT_QUANTITY" as c48,
- T5."REFERENCE_IDENT" as c49,
- T5."PROGRAM" as c50,
- T5."FUNCTION_CODE" as c51,
- T5."TRANSACT_CODE" as c52,
- T5."COMMENT" as c53
- from "deop01"."dbo"."ACCOUNT_INFO" T1,
- "deop01"."dbo"."ACCT_DOC_DATA_01" T5,
- (("deop01"."dbo"."ACCT_DOC_KEY_01" T4 left outer join "deop01"."dbo"."DEPARTMENT_TYPE" T2 on T4."DEPARTMENT" = T2."DEPARTMENT_TYPE_ID") left outer join "deop01"."dbo"."AA_TRTYPE" T3 on T4."AA_TRTYPE" = T3."AA_TRTYPE_ID")
- where (T4."ACCT_NO" = T1."ACCT_NR") and (T4."UNIQUE_IDENT" = T5."REFERENCE_IDENT")
- and (((T1."TYPE_ACCTT" IN ('2','1')) and (not (od_left(T1."ACCT_NR",1)) IN ('4'))) and (T4."BOOKKEEP_DATE" >= TIMESTAMP '2018-01-01 00:00:00.000'))
- END SQL
- COLUMN,0,Acct Nr
- COLUMN,1,Ledger Accts Name
- COLUMN,2,Ledger Accts Name2
- COLUMN,3,Handler
- COLUMN,4,Dept Split
- COLUMN,5,Type Acctt
- COLUMN,6,Department Type Id
- COLUMN,7,Description
- COLUMN,8,Department Group
- COLUMN,9,Aa Trtype Id
- COLUMN,10,Description
- COLUMN,11,Own Description
- COLUMN,12,Rechtseinheit
- COLUMN,13,Betrieb
- COLUMN,14,Marke
- COLUMN,15,Kostenstelle_ori
- COLUMN,16,Betrag
- COLUMN,17,Mandant
- COLUMN,18,Text
- COLUMN,19,Acct No
- COLUMN,20,Bookkeep Date
- COLUMN,21,Bookkeep Period
- COLUMN,22,Document No
- COLUMN,23,Book No
- COLUMN,24,Status
- COLUMN,25,Debit Amount
- COLUMN,26,Credit Amount
- COLUMN,27,Debit Quantity
- COLUMN,28,Credit Quantity
- COLUMN,29,Aa Trtype
- COLUMN,30,Department
- COLUMN,31,Stock
- COLUMN,32,Make Family
- COLUMN,33,Make
- COLUMN,34,Vehicle Type
- COLUMN,35,Model Line
- COLUMN,36,Factory Model
- COLUMN,37,Workshop Model
- COLUMN,38,Product Group
- COLUMN,39,Repair Group
- COLUMN,40,Kit Group
- COLUMN,41,Time Code
- COLUMN,42,Int Voucher No
- COLUMN,43,Balancing Mark
- COLUMN,44,Used Veh Dest Code
- COLUMN,45,Use Of Vehicle
- COLUMN,46,Acct No Next Chart
- COLUMN,47,Stk
- COLUMN,48,Reference Ident
- COLUMN,49,Program
- COLUMN,50,Function Code
- COLUMN,51,Transact Code
- COLUMN,52,Comment
|