Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

With Sybase jTDS, keywords are put in square brackets instead of quotation marks

See original GitHub issue

Columns which names are keywords are put in square brackets instead of quotation marks.

System information:

  • Windows 10 64 Bit
  • DBeaver

Connection specification:

  • Sybase Adaptive Server Enterprise/ 10869 ROLLUP/Sun_svr4/OS 5.6/1996/32bit/FBO/Fri Feb 21 03:19:58 2003
  • Driver: jTDS 1.3.1

Steps to reproduce, if exist:

  • Create a table with columns named date and action
  • Open the table’s context menu in the navigator and select “Read data in SQL console”
  • Created query is SELECT [date], [action] FROM; and a “Confirm query execution” prompt appears

What should happen:

  • Created query is SELECT "date", "action" FROM;, “Confirm query execution” prompt does not appear (actually the quotation marks are not necessary in this case)

Include any warning/errors/backtraces from the logs

Debug log:

2020-01-28 17:48:40.127 - Error while initializing context state
org.jkiss.dbeaver.model.exec.DBCException: SQL-Fehler [102] [37000]: Incorrect syntax near '['.

	at org.jkiss.dbeaver.ext.generic.model.GenericExecutionContext.initDefaultsFrom(
	at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.initializeContextState(
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.openIsolatedContext(
	at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$
Caused by: java.sql.SQLException: Incorrect syntax near '['.

	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(
	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(
	at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(
	at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(
	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCPreparedStatementImpl.execute(
	at org.jkiss.dbeaver.ext.generic.model.GenericExecutionContext.initDefaultsFrom(
	... 6 more

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

serge-ridercommented, Feb 13, 2020

Ugh. Legacy databases are weird.

maffecommented, Feb 17, 2020

6.3.5 release works fine, thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reserved words - Sybase Infocenter
To use a reserved word in a SQL statement as an identifier, you must enclose it in double quotes, square brackets or back...
Read more >
What is the difference between square brackets and single ...
Instead, brackets have to be used as delimiters. Single or double quotation marks can be used to enclose character strings. And finally:.
Read more >
jTDS - SQL Server and Sybase JDBC driver / Discussion / Help
I am using the JDBC-ODBC bridge to connect to an SQLServer 7.0 database. Everything works great. I am now trying to convert it...
Read more >
Forgetting Keywords in Quotes (Phrase Matching) or Brackets ...
Brackets are even more specific: They signify that the searcher must enter the keyword exactly as it appears within the brackets, with nothing...
Read more >
Oracle® SQL Developer - User's Guide - Oracle Help Center
Before Migrating From Microsoft SQL Server or Sybase Adaptive ... migrations only): If this option is enabled, quotation marks (double-quotes) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found