# Exception in executing the jdbc query

**URL:** <https://discuss.elastic.co/t/exception-in-executing-the-jdbc-query/215564>\
**Category:** Logstash\
**Created:** [January 18, 2020, 2:15pm UTC](https://discuss.elastic.co/t/exception-in-executing-the-jdbc-query/215564 "2020-01-18T14:15:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jagan/32/42200_2.png) [@jagan](https://discuss.elastic.co/u/jagan)\
**Post date:** [January 18, 2020, 2:15pm UTC](https://discuss.elastic.co/t/exception-in-executing-the-jdbc-query/215564/1 "2020-01-18T14:15:46Z")

</div>

Hi guru's,

Please help me to solve the issue the as i am facing the exception in executing the jdbc query: The error is as follows:  
[WARN][logstash.inputs.jdbc] Exception when executing JDBC query {:exception=\>#\<Sequel::DatabaseError: Java::JavaSql::SQLSyntaxErrorException: ORA-01722: invalid number

> }.  
> I have taken the select statement as the source for the index creation.but when i run the query in oracle i have got the proper output.But when i try to execute the ingestion command from logstash directory...bin\logstash -f config\_\_.conf got the above error.  
> please help me to solve the issue.
> 
> ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/9/4910ddc023c7ad5d37e04d84a6eb5945056033a5.png)

Thanks in advance,  
jagdish

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 18, 2020, 2:56pm UTC](https://discuss.elastic.co/t/exception-in-executing-the-jdbc-query/215564/2 "2020-01-18T14:56:37Z")

</div>

What does your input configuration look like? What is the SQL statement you are executing?

---

<div class="post-metadata">

**Author:** ![jagan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jagan/32/42200_2.png) [@jagan](https://discuss.elastic.co/u/jagan)\
**Post date:** [January 18, 2020, 5:17pm UTC](https://discuss.elastic.co/t/exception-in-executing-the-jdbc-query/215564/3 "2020-01-18T17:17:05Z")

</div>

Hi Badger thanks for the reply.  
my input configuration looks simple retrieving the records from oracle database.The sql statement i am executing is:  
select  
column1,  
column2,  
FROM  
table\_name  
WHERE column1 BETWEEN :start\_value AND :end\_value

Regards,  
jagdish

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 19, 2020, 2:20am UTC](https://discuss.elastic.co/t/exception-in-executing-the-jdbc-query/215564/4 "2020-01-19T02:20:26Z")

</div>

That would suggest that either start\_value or end\_value is not a valid number. But I think it is more an Oracle SQL question than a logstash question.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 16, 2020, 2:22am UTC](https://discuss.elastic.co/t/exception-in-executing-the-jdbc-query/215564/5 "2020-02-16T02:22:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
