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.
answered 12 Dec '12, 16:10
Try a ; at the end of each statement and see what happens.
answered 05 Dec '12, 12:50