Incorrect syntax near ','.
        Posted  
        
            by jeffreyshek
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by jeffreyshek
        
        
        
        Published on 2010-03-18T13:00:59Z
        Indexed on 
            2010/03/18
            13:11 UTC
        
        
        Read the original article
        Hit count: 356
        
I get the following error from the SQL Script I am trying to run:
Msg 102, Level 15, State 1, Line 10 Incorrect syntax near ','.
This is the SQL script:
IF NOT EXISTS (SELECT * 
                 FROM dbo.sysobjects 
                WHERE id = OBJECT_ID(N'[dbo].HDDB_DataSource]') 
                  AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[HDDB_DataSource](
 [ID] [int] IDENTITY(1,1) NOT NULL,
 [Name] [nvarchar](255) NOT NULL,
 [Type] [nvarchar](50) NOT NULL,
 [XmlFileName] [nvarchar](255) NULL,
 [ConnectionString] [nvarchar](255) NULL),
 CONSTRAINT [PK_DataSource] PRIMARY KEY CLUSTERED 
(
 [ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
I am using SQL Server 2005 if that helps.
Jeff
© Stack Overflow or respective owner