[This topic is migrated from our old forums. The original author name has been removed]
Hi. I upgraded to 8.02...
ANy idea why am I getting :*10:17:43 [CREATE - 0 row(s), 0.000 secs] [Error Code: 102, SQL State: 42000] Incorrect syntax near 'go'.*
-- drop table mtic
create table mtic
(
SID int not null
,RecordID numeric(15,0) null
,procStatus int null
,vwapPx real null
,vwapStartTime datetime null
,vwapEndTime datetime null
,vwapVol int null
,vwapDateCount int null
,vwapTradeCount int null
,mTicpStatus int null
,mTicMsg varchar(1024) null
)
go
grant all on mtic to etma_prod
go
Here is the debug log.....
------------------------- Product Information ------------------------
Product: DbVisualizer Personal 8.0.2
Build: #1700 (2011/08/08 00:35)
Java VM: Java HotSpot(TM) Client VM
Java Version: 1.6.0_26
Java Vendor: Sun Microsystems Inc.
OS Name: Windows XP
OS Arch: x86
OS Version: 5.1
------------------------- Connected Databases ------------------------
Database Type: Sybase ASE
Major Version: 12
Minor Version: 5
Profile: sybase-ase
Connection Message:
Adaptive Server Enterprise
Adaptive Server Enterprise/12.5.4/EBF 14919 ESD#7/P/Sun_svr4/OS 5.8/ase1254/2093/64-bit/FBO/Thu Oct 11 09:25:36 2007
jConnect (TM) for JDBC (TM)
jConnect (TM) for JDBC(TM)/6.05(Build 26023)/P/EBF14466/JDK14/Thu Mar 15 1:05:45 2007
--------------------------- Debug Printouts --------------------------
10:17:41 [DEBUG pool-2-thread-1 E.?] DefaultEditor-8: SybDatabaseMetaData.getUserName()
10:17:42 [DEBUG Thread-94 J.execute] Executing...
10:17:43 [DEBUG Thread-94 J.setCurrentCatalog] DbConnection='ETMA_NYDEV_DS (dbo)' Catalog='tss_ds_dev2' Schema='null' NewCatalog='tss_ds_dev2'
10:17:43 [DEBUG pool-2-thread-1 E.?] DefaultEditor-8: SybDatabaseMetaData.getUserName()
10:17:43 [DEBUG Thread-94 J.setCurrentSchema] DbConnection='ETMA_NYDEV_DS (dbo)' Catalog='null' Schema='dbo' NewSchema='dbo'
10:17:43 [DEBUG pool-2-thread-1 C.?] DefaultEditor-8: SybConnection.createStatement()
10:17:43 [DEBUG pool-2-thread-1 B.?] DefaultEditor-8: SybStatement.execute("create table mtic
(
SID int not null
,RecordID numeric(15,0) null
,procStatus int null
,vwapPx real null
,vwapStartTime datetime null
,vwapEndTime datetime null
,vwapVol int null
,vwapDateCount int null
,vwapTradeCount int null
,mTicpStatus int null
,mTicMsg varchar(1024) null
)
go
grant all on mtic to etma_prod
go")
10:17:43 [DEBUG pool-2-thread-1 B.?] DefaultEditor-8: EXCEPTION -> com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near 'go'.
10:17:44 [DEBUG pool-2-thread-1 E.?] DefaultEditor-8: SybDatabaseMetaData.getUserName()
Hi Alex,
Please verify that Allow "go" as Delimiter is enabled in Tool Properties, in the SQL Editor->Statement Delimiters category.
Best Regards,
Hans
a
anonymous
said
about 13 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Incorrect syntax near 'go'.. again?
Yes, it is checked off..
Hans Bergsten
said
about 13 years ago
[This reply is migrated from our old forums.]
Re: Incorrect syntax near 'go'.. again?
Hi Alex,
Silly question, buit I have to ask: are you perhaps clicking Execute Buffer instead of just Execute?
If not, please send the script to us so we can have a look at it.
Best Regards,
Hans
a
anonymous
said
about 13 years ago
[This reply is migrated from our old forums. The original author name has been removed] [Attachment has been removed.]
Re: Incorrect syntax near 'go'.. again?
Just Execute... First option menu on SQL menu..
If i rollback to 8.0.1, the problem disappear (along with the copy from grid problem that i posted separately) ../..
Hans Bergsten
said
about 13 years ago
[This reply is migrated from our old forums.]
Re: Incorrect syntax near 'go'.. again?
Hi Alex,
Okay, the problem is caused by the TAB characters preceding "go". I will look into a fix for that, but as a work-around you can remove the TABs and it should work fine.
Best Regards,
Hans
Hans Bergsten
said
about 13 years ago
[This reply is migrated from our old forums.]
Re: Incorrect syntax near 'go'.. again?
Hi Alex,
Looking a bit closer at this, the fact that the script runs with the TABs in 8.0.1 seems to be a side effect of an editor issue that has been fixed in 8.0.2. The "go" delimiter is supposed to only be recognized when it comes first on the line, optionally followed by whitespace. These rules have been in effect for some time and the script fails in 7.1.5.
If other tools accept leading whitespace, it can be argued that DbVisualizer should as well, but we have had various problems with "go" over the years and I'm hesitant to change the rules unless there is a very compelling reason to do so.
Best Regards,
Hans
a
anonymous
said
about 13 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Incorrect syntax near 'go'.. again?
Hans,
Removing a tab before 'go' worked. Perhaps the error (or the setting description in the Tool Properties) should've hinted more at the fact that the keyword should not be preceded by any characters.
Thanks!
Hans Bergsten
said
about 13 years ago
[This reply is migrated from our old forums.]
Re: Incorrect syntax near 'go'.. again?
Hi Alex,
We will clarify the rules in both the Tool Properties panel and the Users Guide.
Best Regards,
Hans
anonymous