1

I try creating this table:

CREATE TABLE [dbo].[WEBENGINE_ACTIVE_SESSIONS]
(
    [session_user_id] [int] NOT NULL,
    [session_id] [varchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [session_time] [varchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [session_ip] [varchar](25) COLLATE Chinese_PRC_CI_AS NOT NULL,

    CONSTRAINT [PK_WEBENGINE_ACTIVE_SESSIONS] PRIMARY KEY CLUSTERED 
    ([session_user_id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

and I get error:

[Err] 42000 - [SQL Server]Line 10: Incorrect syntax near '('.

3
  • Looks like it's due to database compatibility issue. Check here stackoverflow.com/q/2279536/2993606 Commented Feb 20, 2015 at 16:54
  • You have to leave WITH (IGNORE_DUP_KEY = OFF) out Commented Feb 20, 2015 at 16:56
  • Thanks, you are right. This is a MS SQL Server 2000 limits. Commented Feb 20, 2015 at 16:59

1 Answer 1

2

You have to leave WITH (IGNORE_DUP_KEY = OFF) in SQL Server 2000.

Make sure you start with a NEW QUERY window.

Sign up to request clarification or add additional context in comments.

1 Comment

I use MS SQL Server 2000, query analyzer generate error:Server: Msg 170, Level 15, State 1, Line 9 Line 9: Incorrect syntax near '('. I try using navicat, connect to sql server successfuly and in new query get same error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.