Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric w

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-18-08, 06:38
jainastha jainastha is offline
Registered User
 
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
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
Reply With Quote
  #2 (permalink)  
Old 07-18-08, 08:29
jainastha jainastha is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 07-21-08, 07:36
dbforumsB dbforumsB is offline
Registered User
 
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On