# JDBC Connector - Sybase UPSERT method fails due to Syntax Error

**URL:** <https://forum.confluent.io/t/jdbc-connector-sybase-upsert-method-fails-due-to-syntax-error/5650>\
**Category:** Kafka Connect\
**Created:** [29 July 2022 00:40 UTC](https://forum.confluent.io/t/jdbc-connector-sybase-upsert-method-fails-due-to-syntax-error/5650 "2022-07-29T00:40:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanemougham](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/shanemougham/32/2081_2.png) [@shanemougham](https://forum.confluent.io/u/shanemougham)\
**Post date:** [29 July 2022 00:40 UTC](https://forum.confluent.io/t/jdbc-connector-sybase-upsert-method-fails-due-to-syntax-error/5650/1 "2022-07-29T00:40:12Z")

</div>

Hi All,

I am using Kafka JDBC Connector to read and write data with Sybase. I am able to write to Sybase using Insert method, however it fails while using UPSERT.

Error - Sql Exception - Syntax Error - Near “WITH” and “AS” . After enabling the debug I could see SQL created for UPSERT contains “MERGE into abctable with (HOLDLOCK) AS target …” which is syntax as per SQLServer dialect java file.

However I could see connector starts with Sybasedialect in the logs, but while generating SQL, it uses SQLServer Dialect

Below are config I am using.

```
"connection.url": "jdbc:jtds:sybase://xx.x.x.xx:5000/xxxxdb",
"dialect.name" : "SybaseDatabaseDialect",
"insert.mode": "upsert",

```

How to fix this issue of generate SQL using sybsaedialect?

Is there way to config connector to use JCONN3.jar which is written exclusively for Sybase.?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [28 August 2022 00:40 UTC](https://forum.confluent.io/t/jdbc-connector-sybase-upsert-method-fails-due-to-syntax-error/5650/2 "2022-08-28T00:40:54Z")

</div>

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