I'm having a problem when using Shift + F9 to single step through code in the Interactive SQL window. Consider the following code: DECLARE @A INTEGER DECLARE @B INTEGER When I use Shift + F9 it executes this code just fine. It doesn't do anything interesting but the Interactive SQL window behaves exactly as expected, executing the whole thing as one pointless statement. Now consider the following variant with GO statements inserted: DECLARE @A INTEGER = 1 GO DECLARE @B INTEGER = 2 GO The first time I use Shift + F9 it fails with an ISQL Error that says Could not execute statement. Syntax error near 'G' on line 2 SQLCODE=-131, ODBC 3 State="42000". If I simply hit F5 to execute the whole thing it works fine, so I'm hard pressed to understand how this can be a legitimate syntax error. Thanks in advance for any light y'all can shed on this issue. |
This is a bug. You can replace the GO lines with semicolons as a workaround. Thank you for bringing this to our attention. We'll try to get it fixed in an upcoming EBF. Excellent! Thanks for verifying that I'm not nuts; I look forward to the fix.
(13 Dec '12, 08:40)
JWilliston
|
Try a ; at the end of each statement and see what happens. Same error, different location in the script. It looks like some kind of parsing bug to me.
(05 Dec '12, 12:52)
JWilliston
Sorry remove the go lines
(05 Dec '12, 12:57)
J Diaz
Removing the GO lines doesn't answer the question, which is why the Interactive SQL window chokes on them as syntax errors.
(05 Dec '12, 13:27)
JWilliston
I guess since you are mixing dialects it is too much for the debugger!
(05 Dec '12, 14:13)
nico
|