With Sybase jTDS, keywords are put in square brackets instead of quotation marks
See original GitHub issueColumns which names are keywords are put in square brackets instead of quotation marks.
System information:
- Windows 10 64 Bit
- DBeaver 6.3.3.202001191557
Connection specification:
- Sybase Adaptive Server Enterprise/12.0.0.7/P/EBF 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
andaction
- Open the table’s context menu in the navigator and select “Read data in SQL console”
- Created query is
SELECT [date], [action] FROM foo.bar.baz;
and a “Confirm query execution” prompt appears
What should happen:
- Created query is
SELECT "date", "action" FROM foo.bar.baz;
, “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(GenericExecutionContext.java:160)
at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.initializeContextState(GenericDataSource.java:188)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:138)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.openIsolatedContext(JDBCRemoteInstance.java:120)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$OpenContextJob.run(SQLEditor.java:577)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.sql.SQLException: Incorrect syntax near '['.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:784)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCPreparedStatementImpl.execute(JDBCPreparedStatementImpl.java:261)
at org.jkiss.dbeaver.ext.generic.model.GenericExecutionContext.initDefaultsFrom(GenericExecutionContext.java:156)
... 6 more
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ugh. Legacy databases are weird.
6.3.5 release works fine, thank you!