# Importing datetime2 column from sql is giving error

**URL:** <https://discuss.elastic.co/t/importing-datetime2-column-from-sql-is-giving-error/70889>\
**Category:** Logstash\
**Created:** [January 8, 2017, 5:32pm UTC](https://discuss.elastic.co/t/importing-datetime2-column-from-sql-is-giving-error/70889 "2017-01-08T17:32:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saisn](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saisn](https://discuss.elastic.co/u/saisn)\
**Post date:** [January 8, 2017, 5:32pm UTC](https://discuss.elastic.co/t/importing-datetime2-column-from-sql-is-giving-error/70889/1 "2017-01-08T17:32:23Z")

</div>

Hi,

I'm importing a table from SQL using logstash and one of the fields in table has a 'datetime2' field which gives an error as below

Exception when executing JDBC query {:exception=\>#\<Sequel::DatabaseError: Java::ComMicrosoftSqlserverJdbc::SQLServerException: Operand type clash: datetime2 is incompatible with int\>, :level=\>:warn}

can someone tell me as how this error can be fixed.

Thanks

---

<div class="post-metadata">

**Author:** ![saisn](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saisn](https://discuss.elastic.co/u/saisn)\
**Post date:** [January 8, 2017, 5:37pm UTC](https://discuss.elastic.co/t/importing-datetime2-column-from-sql-is-giving-error/70889/2 "2017-01-08T17:37:56Z")

</div>

This is happening because i'm using the field as a tracking column in my configuration. Otherwise, i dont see an issue

---

<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 5, 2017, 5:38pm UTC](https://discuss.elastic.co/t/importing-datetime2-column-from-sql-is-giving-error/70889/3 "2017-02-05T17:38:09Z")

</div>

Closed on February 5, 2017, 5:38pm UTC

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