Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    8

    Unanswered: java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric w

    Hi,
    I m getting
    java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected in my jsp page.
    The query which i ran for this in my jsp page is
    String UR_Query = "SELECT SRV.ROW_ID AS ROW_ID, SRV.SR_NUM AS SR, SRVX.ATTRIB_41 AS Performer, EMP1.LOGIN AS Owner, CON1.EMAIL_ADDR AS OWNR_EMAIL, ORG.NAME AS Account, SRV.SR_STAT_ID AS Status, SRV.SR_TITLE AS SH_DESCR, SRV.DESC_TEXT AS LNG_DESCR, TO_CHAR(SRV.X_PROP_TIME, 'Month dd yyyy hh:mi AM') AS PROP_TIME, TO_CHAR(SRV.X_HOURS, 'B9999.00') AS Duration, SRV.SR_AREA AS Area, SRV.SR_CAT_TYPE_CD, SRV.X_APPR_TIME AS Schedule FROM S_SRV_REQ SRV, S_SRV_REQ_X SRVX, S_ORG_EXT ORG, S_USER EMP1,S_CONTACT CON1 WHERE SRV.ROW_ID = SRVX.PAR_ROW_ID (+) AND SRV.X_CHG_OWNER_ID = EMP1.ROW_ID(+) AND EMP1.ROW_ID = CON1.ROW_ID (+) AND SRV.CST_OU_ID = ORG.ROW_ID (+) AND SRV.SR_CAT_TYPE_CD='Change' AND (SRV.SR_STAT_ID = 'Incomplete Change Plan' OR SRV.SR_STAT_ID = 'On-Hold') AND SRV.X_PROP_TIME >= TO_DATE('" + startDate + "', 'MM-DD-YY') AND SRV.X_PROP_TIME < TO_DATE('" + endDate + "','MM-DD-YY') + INTERVAL '+1' DAY " ;

    Please tell me how it Should return an error-asking user to enter the date in mm/dd/yyyy format
    instead of
    java.sql.SQLException: ORA-01858: a non-numeric character was found where a
    numeric was expected.
    thanks,
    astha

  2. #2
    Join Date
    Jul 2008
    Posts
    8

    java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric w


    Hi,
    I m getting exception java.sql.SQLException: ORA-01858: a non-numeric character was found where a
    numeric was expected when i enter start date in jsp page in text field.

    Please tell me how Should I return an error-asking user to enter the date in mm/dd/yyyy format INSTEAD OF getting below exception on my jsp page

    java.sql.SQLException: ORA-01858: a non-numeric character was found where a
    numeric was expected
    thanks,
    astha

  3. #3
    Join Date
    Jun 2008
    Posts
    10
    First try to resolve this issue:
    java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected.

    Then go for specific user message for any error.

    Check properly each and every column of tables used in the query,whether satisfying the data type(numerical or string etc.)

    Regards
    Baseet Ahmed
    Information Technologist

Posting Permissions

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