Results 1 to 3 of 3

Thread: decfloat error

  1. #1
    Join Date
    Jul 2014
    Posts
    4

    Unanswered: decfloat error

    hi,

    i am getting the below error while running the query in datastudio against the db2 tables.

    SQLFetch reported: SQLSTATE = 22018: Native Error Code = -420: Msg = [IBM][CLI Driver][DB2/LINUXX8664] SQL0420N Invalid character found in a character string argument of the function "DECFLOAT". SQLSTATE=22018 (CC_DB2DBStatement::dbsFetch, file CC_DB2DBStatement.cpp, line 1985)

    The query is given below

    SELECT
    MAX(CASE WHEN LN_OVERRULE_ID = '614' THEN 'OVRL'
    WHEN APP.QUEUE_START_DT between '01-01-2009' and '01-02-2011' AND ln_overrule_id=615 and CON.APP_ID Is Null then 'SAD'
    WHEN APP.QUEUE_START_DT between '01-01-2009' and '01-FEB-2011' AND ln_overrule_id=615 and CON.APP_ID Is not Null then 'BLC'
    WHEN APP.QUEUE_START_DT between '01-JAN-2009' and '01-FEB-2011' AND app.app_cqr_final_org in (9,10) and CON.APP_ID Is Null then 'BLCW'
    WHEN APP.QUEUE_START_DT between '01-JAN-2009' and '01-FEB-2011' AND app_org in (9,10) and CON.APP_ID Is Null then 'BLCW'
    WHEN CQR_ORR >= 12 AND CQR_ORR IS NOT NULL AND LN_OVERRULE_ID = 615 THEN 'SAD'
    WHEN APP.ORR >= 12 AND APP.ORR IS NOT NULL AND LN_OVERRULE_ID = 615 THEN 'SAD'
    WHEN CQR_ORR >= 12 AND CQR_ORR IS NOT NULL THEN 'BLCW'
    WHEN APP.ORR >= 12 AND APP.ORR IS NOT NULL THEN 'BLCW'
    WHEN app.app_cqr_final_org >= 9 AND LN_OVERRULE_ID = 615 THEN 'SAD'
    WHEN APP.ORR >= 9 AND LN_OVERRULE_ID = 615 THEN 'SAD'
    WHEN APP.app_cqr_final_org >= 9 THEN 'BLCW'
    WHEN APP.ORR >= 9 THEN 'BLCW'
    ELSE 'BLC' END) as ADJUDICATOR
    FROM EDWSTG1DV.VELOCITY APP APP
    LEFT OUTER JOIN EDWSTG1DV.VELOCITY_LOAN LOAN
    ON APP.APP_ID = LOAN.APP_ID
    LEFT OUTER JOIN EDWSTG1DV.EIM_HCS
    ON LOAN.ASSN_CODE = ORGHIER.FICS
    LEFT OUTER JOIN EDWSTG1DV.VELOCITY_APPLICATION_CQR CQR
    ON APP.APP_ID = CQR.APP_ID
    LEFT JOIN EDWDV.EIM_HCS_TBHIERWORKINGROLLUPS ROLL
    ON ORGHIER.CENTER = ROLL.CHILDNODE
    LEFT OUTER JOIN EDWDV.VELOCITY_MARKET_CONCUR_APPS CON
    ON APP.APP_ID = CON.APP_ID
    WHERE
    (APP.AUTH_ID = 1 OR APP.AUTH_ID IS NULL)
    GROUP BY
    APP.APP_OFFICER_ID,
    APP.OFFICER_NAME,
    OFFICER_NAME,
    APP_ASSIGN_ID,
    APP.APP_ID,
    TRIM(APP.APP_ID)||'V',
    APP.QUEUE_ACTIVITY_ID,
    APP.QUEUE_START_DT,
    CASE WHEN LOAN.PROD_TYPE_DESC IS NULL OR LOAN.PROD_TYPE_DESC <> 'LEASE' THEN 'LOAN'
    ELSE 'LEASE'
    END,
    APP.REGION_DESC,
    CASE
    WHEN TRIM(LEVEL03NAME) = 'R4001' THEN 'AUTO FINANCE AND DEALER SERVICES'
    WHEN UPPER(ROLL.GEOREGION) = '00 - NOT APPLICABLE' THEN NULL
    ELSE ROLL.GEOREGION
    END,
    APP.WSC_TOTAL_SCORE,
    CASE WHEN APP.APP_CQR_FINAL_ORG IS NULL THEN APP.APP_ORG
    WHEN APP.APP_REQUEST_TYPE_IND = 'J' OR APP.APP_REQUEST_TYPE_IND = 'P'
    THEN APP.APP_CQR_FINAL_ORG
    ELSE APP_ORG
    END,
    APP_REQUEST_TYPE_IND,
    APP.EMP_LNAME ||', '|| APP.EMP_FNAME,
    APP.APP_AGG_EXPOSURE,
    APP.ENT_NAME,
    APP.OFF_NAME,
    CASE WHEN APP.APP_COMPLEX_ID = 586 THEN 'S_w_Fin'
    WHEN APP.APP_COMPLEX_ID = 7277 THEN 'S_Cplex'
    ELSE 'NA'
    END,
    ----ADJUDICATOR,
    APP.AUTH_DT,
    APP.DEC_REASONS,
    APP.ENT_SIC_CODE,
    APP.ENT_NAICS_CODE,
    APP.NAICS_HI_RISK_YN,
    APP.ENT_OBGR_NUM,
    APP.COMP_YRS_EST,
    APP.PKGD_DESC,
    ORGHIER.LEVEL04ALIAS,
    CASE WHEN APP.ORR IS NULL
    THEN CQR.CQR_ORR
    ELSE APP.ORR
    END

  2. #2
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    Find and fix (or ignore, or handle in another way) the data that db2 is rejecting...

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by sukh View Post
    ...
    Code:
    CASE WHEN LN_OVERRULE_ID = '614' THEN 'OVRL'														
     WHEN ... AND ln_overrule_id=615 ...
    What is the data type of the LN_OVERRULE_ID column?
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •