.

ISSUE | SOLVED - i-NET : ORA-01858: a non-numeric character was found where a numeric was expected

Issue: 

While working with i-Net you may see an issue where your query looks okay and works well in sql developer, but throws exception while validating in i-Net. This happens when you use parameters in the query.

SELECT minbal.party_id,

   minbal.transfer_date,

   (minbal.previous_balance/100) a

FROM MTX_TRANSACTION_ITEMS minbal

WHERE     minbal.Transfer_status = 'TS'

   AND  minbal.transfer_date < TO_DATE({?toDate}, 'DD/MM/YYYY HH24:MI:SS')

   and  minbal.transfer_date > TO_DATE({?fromDate}, 'DD/MM/YYYY HH24:MI:SS')


Complete Logs:

Report Error [615] The database returned the following error: ORA-01858: a non-numeric character was found where a numeric was expected
[Oracle] #5
Database Error State: 22008
Database Error Code: 1858
    at com.inet.report.ReportExceptionFactory.createReportException(SourceFile:41)
    at com.inet.report.ReportExceptionFactory.createReportExceptionWithCause(SourceFile:143)
    at com.inet.adhoc.server.visualdb.VLCommandImpl.c(SourceFile:962)
    at com.inet.adhoc.server.visualdb.VLCommandImpl.a(SourceFile:863)
    at com.inet.adhoc.server.visualdb.VLCommandImpl.changeCommand(SourceFile:409)
    at com.inet.designer.dialog.visualdb2.bv.nA(SourceFile:789)
    at com.inet.designer.dialog.visualdb2.bv.call(SourceFile:786)
    at com.inet.guilib.AsyncWorker.doInBackground(AsyncWorker.java:93)
    at javax.swing.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at javax.swing.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLDataException: ORA-01858: a non-numeric character was found where a numeric was expected
[Oracle] #5
    at com.inet.ora.aj.a(Unknown Source)
    at com.inet.ora.ax.a(Unknown Source)
    at com.inet.ora.ax.a(Unknown Source)
    at com.inet.ora.ax.a(Unknown Source)
    at com.inet.ora.bn.a(Unknown Source)
    at com.inet.ora.bn.executeQuery(Unknown Source)
    at com.inet.report.ek.a(SourceFile:2274)
    at com.inet.report.TableSource.a(SourceFile:2250)
    at com.inet.report.TableSource.refresh(SourceFile:2052)
    at com.inet.report.TableSource.refresh(SourceFile:1847)
    at com.inet.adhoc.server.visualdb.VLCommandImpl.c(SourceFile:950)
    ... 11 more




Solution:

 If you are using parameters with null default value then try setting the default value. After setting default value, re-validate the query. It should work.

 


No comments :

Post a Comment

Recent Posts