Hi,

In SQL Server 2005 Management Studio, I'm trying to copy an existing table from one database to another (DEV to PROD).

My first thought is to right click the table name, select Edit, copy the generated SQL for create Table, and use it in a New Query in the PROD database.

However, when I check the syntax of the SQL statement, I get the following error:

Msg 170, Level 15, State 1, Line 12
Line 12: Incorrect syntax near '('.

I've looked over the SQL statement. All parens match, so it's not that. Being somewhat unfamiliar with creating tables this way, I just can not locate the error. I would think that SQL generated code would be syntax correct.

I've attempted to rename the table inthe SQL statement in caes it is breaking because the table exists. That doesn't do it.

Here is the SQL Statement:

Code:
USE [dbHMDS2004]
GO
/****** Object:  Table [dbo].[tblInvoiceImportCommentsx]    Script Date: 02/12/2008 09:26:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblInvoiceImportCommentsx](
	[nvchrInternalComment] [nvarchar](50) NOT NULL,
	[bitInactive] [bit] NULL,
	[bitAdminOnly] [bit] NULL,
	[dtmCreatedDate] [smalldatetime] NOT NULL CONSTRAINT [DF_tblFrmRowCommentAdmin_dtmCreatedDate]  DEFAULT (getdate()),
	[dtmModifiedDate] [smalldatetime] NOT NULL CONSTRAINT [DF_tblFrmRowCommentAdmin_dtmModifiedDate]  DEFAULT (getdate()),
	[nvchrUserName] [nvarchar](50) NULL,
	[intBusinessRule] [int] NULL,
 CONSTRAINT [PK_tblFrmRowCommentAdmin] PRIMARY KEY CLUSTERED 
(
	[nvchrInternalComment] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
Any ideas? Much thanks. I need to do the update to PROD today.