# JDBC Input parameters adds a N'' within the query

**URL:** <https://discuss.elastic.co/t/jdbc-input-parameters-adds-a-n-within-the-query/176880>\
**Category:** Logstash\
**Created:** [April 15, 2019, 10:20am UTC](https://discuss.elastic.co/t/jdbc-input-parameters-adds-a-n-within-the-query/176880 "2019-04-15T10:20:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saif3r](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@saif3r](https://discuss.elastic.co/u/saif3r)\
**Post date:** [April 15, 2019, 10:20am UTC](https://discuss.elastic.co/t/jdbc-input-parameters-adds-a-n-within-the-query/176880/1 "2019-04-15T10:20:45Z")

</div>

Hi Guys,

I'm trying to exact resultset from Microsoft SQL Server using JDBC but i have stumbled upon an issue.  
Here's the config:

> input {  
> jdbc {  
> parameters =\> {  
> database =\> ABC  
> }  
> jdbc\_driver\_library =\> "/usr/share/logstash/lib/drivers/sqljdbc42.jar"  
> jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
> jdbc\_connection\_string =\> "server:1433"  
> jdbc\_user =\> "login"  
> jdbc\_password =\> "pwd"  
> schedule =\> "\*/1 \* \* \* \*"  
> statement\_filepath =\> "/etc/logstash/conf.d/query.sql"  
> use\_column\_value =\> true  
> tracking\_column\_type =\> "numeric"  
> tracking\_column =\> "id"  
> last\_run\_metadata\_path =\> "/usr/share/logstash/last\_run\_metadata/.query"  
> record\_last\_run =\> true  
> }  
> }

The query looks like this:

> select \* from :database.dbo.table

Logstash is unable to retreive any result, due to an error with the query. In the log i can see that's it's trying to execute the following:

> select \* from N'ABC'.dbo.table

Any idea how to get rid of N'' in table name? I know it's a matter of using National language character set but I would like to overcome this.  
I'd appreciate the help, thanks!

I tried using quotes, double quotes but the outcome is exactly the same.

---

<div class="post-metadata">

**Author:** ![saif3r](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@saif3r](https://discuss.elastic.co/u/saif3r)\
**Post date:** [April 19, 2019, 12:36pm UTC](https://discuss.elastic.co/t/jdbc-input-parameters-adds-a-n-within-the-query/176880/2 "2019-04-19T12:36:40Z")

</div>

Hi Guys, any ideas?

---

<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:** [May 17, 2019, 12:36pm UTC](https://discuss.elastic.co/t/jdbc-input-parameters-adds-a-n-within-the-query/176880/3 "2019-05-17T12:36:41Z")

</div>

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