Incorrect syntax near 'GO' with Scoped Query for SQL Server

Answered

I updated Datagrip today and the ctl+enter scoped query seems to not handle the GO keyword with SQL Server anymore.

The following code runs using select all (ctl+a) then ctl+enter but ctl+enter then selecting the scope causes returns: "[S0001][102] Incorrect syntax near 'GO'."

USE master
GO

SELECT NEWID()
GO

DataGrip 2018.1.2
Build #DB-181.4892.10, built on April 27, 2018
Licensed to ***/***
Subscription is active until December 26, 2018
JRE: 1.8.0_152-release-1136-b34 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Thanks,

- John

0
5 comments

@John Conklin
Could you attach a screenshot of your Database -> General settings?

Also, it looks like there is a similar issue https://youtrack.jetbrains.com/issue/DBE-6358

0

There does appear to be some overlap.

-

0

@John Conklin
With similar settings, I can't reproduce the issue:


=>



0

Odd, well something changed with 2018.1.2

And you ran it with ctrl+enter?

Maybe a change to the driver?  Config:

applicationIntent readwrite
applicationName Microsoft JDBC Driver for SQL Server
columnEncryptionSetting Disabled
databaseName  
disableStatementPooling true
encrypt false
failoverPartner  
hostNameInCertificate  
instanceName mssqlserver
integratedSecurity false
keyStoreAuthentication  
keyStoreSecret  
keyStoreLocation  
lastUpdateCount true
lockTimeout -1
loginTimeout 15
multiSubnetFailover false
packetSize 8000
portNumber 1433
queryTimeout -1
responseBuffering adaptive
selectMethod direct
sendStringParametersAsUnicode true
serverNameAsACE false
serverName localhost
serverSpn  
TransparentNetworkIPResolution true
trustServerCertificate false
trustStoreType JKS
trustStore  
trustStorePassword  
trustManagerClass  
trustManagerConstructorArg  
sendTimeAsDatetime true
workstationID  
xopenStates false
authenticationScheme nativeAuthentication
authentication NotSpecified
socketTimeout 0
fips false
enablePrepareOnFirstPreparedStatementCall false
serverPreparedStatementDiscardThreshold 10
statementPoolingCacheSize 0
jaasConfigurationName SQLJDBCDriver
sslProtocol TLS
   
0

@ Conklin, John 

> And you ran it with ctrl+enter?

Yes, firstly I press `Ctrl+A` to select all statements and then I press `Ctrl+Enter` to execute them.

0

Please sign in to leave a comment.