Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 create table syntax error

Author  Topic 

mgandra
Starting Member

15 Posts

Posted - 2007-05-03 : 17:29:33
When I checked the syntax of the following
CREATE TABLE [dbo].[Attachment](
[AttachmentUUID] [uniqueidentifier] NOT NULL,
[AgencyID] [uniqueidentifier] NOT NULL,
[AttachmentName] [varchar](300) NOT NULL,
[EntityID] [bigint] NOT NULL,
[EntityTypeID] [tinyint] NOT NULL,
[CreateUserID] [bigint] NOT NULL,
[CreateDateTime] [datetime] NOT NULL,
[ModifyUserID] [bigint] NOT NULL,
[ModifyDateTime] [datetime] NOT NULL,
CONSTRAINT [PK_Attachment] PRIMARY KEY CLUSTERED
(
[AttachmentUUID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

I got Msg 170, Level 15, State 1, Line 14
Line 14: Incorrect syntax near '('.

What is wrong with the line?
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]


Thanks

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-05-03 : 17:46:28
are you trying to create this table on a 2000 box?

Dinakar Nethi
SQL Server MVP
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-05-03 : 17:48:45
...or on a database where the compatibility level is set to 80 instead of 90?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

mgandra
Starting Member

15 Posts

Posted - 2007-05-03 : 18:06:35
I'm trying it on SQL Server 2005
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-05-03 : 18:36:30
Did you see my post? What is the database compatibility level set to for this database?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-03 : 18:40:48
uise
exec sp_dbcmptlevel 'yourDbName'
to find out the compatibility level.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -