# JDBC and tracking\_column(s) questions

**URL:** <https://discuss.elastic.co/t/jdbc-and-tracking-column-s-questions/51997>\
**Category:** Logstash\
**Created:** [June 6, 2016, 7:56pm UTC](https://discuss.elastic.co/t/jdbc-and-tracking-column-s-questions/51997 "2016-06-06T19:56:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 8, 2016, 6:49pm UTC](https://discuss.elastic.co/t/jdbc-and-tracking-column-s-questions/51997/2 "2016-06-08T18:49:09Z")

</div>

> How do you use multiple tracking\_column at the same time. For example, my "table" is actually a view over multiple tables, so I need to have it select based on 2 columns (commandtime and commandid). I really don't want to have to build logstash task for each of the 10 tables in my view.

Concatenate those two columns in your SELECT clause and use that as the tracking column.

> How do I handle auto reset of the sql\_last\_value? Everyday the base tables are renamed and new tables created at around midnight.

Won't this be fixed if you follow my suggestion above?

---

_[View the full topic](https://discuss.elastic.co/t/jdbc-and-tracking-column-s-questions/51997)._
