# Sql\_last\_value ot working?

**URL:** <https://discuss.elastic.co/t/sql-last-value-ot-working/75410>\
**Category:** Logstash\
**Created:** [February 16, 2017, 10:40pm UTC](https://discuss.elastic.co/t/sql-last-value-ot-working/75410 "2017-02-16T22:40:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mano\_even](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mano\_even](https://discuss.elastic.co/u/mano_even)\
**Post date:** [February 16, 2017, 10:40pm UTC](https://discuss.elastic.co/t/sql-last-value-ot-working/75410/1 "2017-02-16T22:40:26Z")

</div>

Hello ,

i just import my data from my mssql server to ES.

now i am trying to use the the sql\_last\_value options ,but its not working.

i have a column in my table "myDate", so i want when i update it , iget the updated data to ES!

input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:sqlserver://localhost:53140;instanceName=SQLEXPRESS;databaseName=db1"  
jdbc\_user =\> "root"  
jdbc\_password =\> "root"  
jdbc\_driver\_library =\> "D:\ES\sqljdbc42.jar"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
statement =\> "select \* from dbo.testtable where myDate \> :sql\_last\_value"  
schedule =\> "\* \* \* \* \*"  
use\_column\_value =\> true  
tracking\_column =\> mydate

}  
}  
filter {

}  
output {  
stdout { codec =\> json\_lines }  
elasticsearch {  
#protocol =\> http  
index =\> "homindex"  
document\_type =\> "homdata"  
document\_id =\> "%{personid}"  
hosts =\> "localhost"

```
    }

```

and my document :  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/4/425717c73ee276a19ff077522b392ccdc775cdc6.PNG)

Thank you in advance

---

<div class="post-metadata">

**Author:** ![mano\_even](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mano\_even](https://discuss.elastic.co/u/mano_even)\
**Post date:** [February 17, 2017, 2:31pm UTC](https://discuss.elastic.co/t/sql-last-value-ot-working/75410/2 "2017-02-17T14:31:37Z")

</div>

i just find out where was my problem!

i had to moify the "logstash\_jdbc\_last\_run" .

---

<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:** [March 17, 2017, 2:31pm UTC](https://discuss.elastic.co/t/sql-last-value-ot-working/75410/3 "2017-03-17T14:31:49Z")

</div>

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