# Sql\_last\_value

**URL:** <https://discuss.elastic.co/t/sql-last-value/144345>\
**Category:** Logstash\
**Created:** [August 14, 2018, 12:26pm UTC](https://discuss.elastic.co/t/sql-last-value/144345 "2018-08-14T12:26:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olha1](https://avatars.discourse-cdn.com/v4/letter/o/9f8e36/32.png) [@Olha1](https://discuss.elastic.co/u/Olha1)\
**Post date:** [August 14, 2018, 12:26pm UTC](https://discuss.elastic.co/t/sql-last-value/144345/1 "2018-08-14T12:26:28Z")

</div>

Hi! I have query in my logstash.config file. Where field "where" is:  
where column."Id" \> :sql\_last\_value  
But, in result, after run this I have  
column."Id" \> '2018-08-13 17:02:41.489705+0300'  
Why logstash get data last\_value instead Id?

---

<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:** [August 14, 2018, 1:24pm UTC](https://discuss.elastic.co/t/sql-last-value/144345/2 "2018-08-14T13:24:04Z")

</div>

Have you set the use\_column\_value option to be true?

---

<div class="post-metadata">

**Author:** ![Olha1](https://avatars.discourse-cdn.com/v4/letter/o/9f8e36/32.png) [@Olha1](https://discuss.elastic.co/u/Olha1)\
**Post date:** [August 14, 2018, 2:57pm UTC](https://discuss.elastic.co/t/sql-last-value/144345/3 "2018-08-14T14:57:32Z")

</div>

Yes.  
use\_column\_value =\> true  
tracking\_column =\> "id"

---

<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:** [September 11, 2018, 2:57pm UTC](https://discuss.elastic.co/t/sql-last-value/144345/4 "2018-09-11T14:57:36Z")

</div>

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