?
Solved

ORA-01722

Posted on 2011-02-11
2
Medium Priority
?
943 Views
Last Modified: 2012-05-11
Please advice why I have ORA-01722 if local variable is double
double[] outY = new double[10];

Open in new window

sql
System.out.println(outY[0] + "  = outY[0]  "  + new java.util.Date());
sql_Y = " INSERT INTO RBF_DATA " + "(OUTY0) " + "VALUES " + "('" + outY[0] + "')";

Open in new window

and output
0.12258723414643523  = outY[0]  Fri Feb 11 19:27:52 EET 2011

11.02.2011 19:27:53 connect.SelectData run
SEVERE: null
java.sql.SQLSyntaxErrorException: ORA-01722:

Open in new window

column
CREATE TABLE "LIONFX"."RBF_DATA"
  (
    "ID" NUMBER NOT NULL ENABLE,
    "OUTY0" FLOAT(126),

Open in new window

when I change column to VARCHAR2 everything ok.
But outY[] declared as a double.
Please advice.
0
Comment
Question by:gbcbr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
aciuica earned 2000 total points
ID: 34873341
Maybe you should remove the single quote characters.
Instead of:
sql_Y = " INSERT INTO RBF_DATA " + "(OUTY0) " + "VALUES " + "('" + outY[0] + "')";
you can try:
sql_Y = " INSERT INTO RBF_DATA " + "(OUTY0) " + "VALUES " + "(" + outY[0] + ")";
0
 

Author Comment

by:gbcbr
ID: 34873358
Yes!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question