This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The # character is used to create temporary tables in MS SQL Server. However, the SQL Editor returns an error when the following SQL Query is used: CREATE TABLE #Yaks (YakID int,YakName char(30)) Error code 170, SQL state 37000: Line 1: Incorrect syntax near 'TABLE'. Line 1, column 1 When using that same command else where e.g. in Java Code or in the MS SQL Query Analyzer it works fine without an error being given. Tested with the Microsoft SQL JDBC driver 1.2.5 Product Version: NetBeans IDE 7.2 (Build 201207171143) Updates: Updates available Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03 System: Windows 7 version 6.1 running on x86; Cp1252; en_GB (nb) User directory: C:\Users\gk85\AppData\Roaming\NetBeans\7.2 Cache directory: C:\Users\gk85\AppData\Local\NetBeans\Cache\7.2
http://hg.netbeans.org/core-main/rev/aeec33367fb4 The problem is that the # character is used by MySQL for line comments, so part of the statement was removed. Now the type of database is checked to decide whether # comments should be supported. Thank you for reporting.
Integrated into 'main-golden', will be available in build *201211240959* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/aeec33367fb4 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #222617: The '#' character used for temporary tables creates an error for MS SQL Server
Thanks, I can confirm that the issue has now been resolved at my end: CREATE TABLE #Yaks (YakID int,YakName char(30)) Executed successfully in 0 s. Line 1, column 1 Execution finished after 0 s, 0 error(s) occurred.