473,388 Members | 1,230 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

syntax error ALTER TABLE

Hi
Having a problem with a ms sql 2000 server. The script below was
created i SQL manager 2005 lite and gives a syntax error near '('

ALTER TABLE [dbo].[Community_ActivityLog]
ADD CONSTRAINT [PK_Community_Errors]
PRIMARY KEY CLUSTERED ([activity_ID])
WITH (
PAD_INDEX = OFF,
IGNORE_DUP_KEY = OFF,
STATISTICS_NORECOMPUTE = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

Any ideas of what might be wrong?

/Michael

Jul 25 '06 #1
1 2660
obastard (in**@prognet.dk) writes:
Having a problem with a ms sql 2000 server. The script below was
created i SQL manager 2005 lite and gives a syntax error near '('

ALTER TABLE [dbo].[Community_ActivityLog]
ADD CONSTRAINT [PK_Community_Errors]
PRIMARY KEY CLUSTERED ([activity_ID])
WITH (
PAD_INDEX = OFF,
IGNORE_DUP_KEY = OFF,
STATISTICS_NORECOMPUTE = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

Any ideas of what might be wrong?
Whenever you get a syntax error you should consult the syntax diagram in
Books Online.

In this case, when you are using a tool for SQL 2005 and run the output
on an earlier version, you should suspect that the tool has generated
syntax which is new for SQL 2005. This is indeed the case here.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Guinness Mann | last post by:
I have an existing table: CREATE TABLE TestQuestions ( qId int NOT NULL IDENTITY(1,1) CONSTRAINT PK_TestQuestions PRIMARY KEY NONCLUSTERED, testId int NOT NULL REFERENCES Tests(testId)...
14
by: bolidev | last post by:
I'm new to SQL and can't figure out how to update my table (StoreItemStatus) that contains the current status for items in each store (STORE_KEY, ITEM_KEY, STATUS,...). I get updated status info...
5
by: GitarJake | last post by:
Hello all, Newbie here. SQL 2000, Windows 2000 I'm trying to alter tables in my SQL DB using statements like the following: /* AD_GROUPS */ alter table AD_GROUPS alter column...
6
by: Brian Basquille | last post by:
Just started learning SQL recently. But one thing i'm still not clear on is about altering relationships between tables after they've been created. Instead of creating a foreign key when the...
1
by: HH | last post by:
I try to make a script for generating backend databases. When I try to make a relationship between a table named 'users' and another table name 'layouts' an error occurs. Option 1:...
6
by: sushjames | last post by:
hello experts, i'm having a problem in this synatx alter table <table name> drop column <column name> alter tabel <table name> rename column <old column name> to <new...
3
by: eros | last post by:
ALTER TABLE public.postcodes ALTER COLUMN machi TYPE varchar(100); Error: ERROR: syntax error at or near "TYPE"; Error while executing the query (State:42601, Native Code: 7) I am using...
4
by: JenavaS | last post by:
I am trying to create a macro to change a data type in a column. The table was created using a "make-table" query, and the column(s) I want to modify were created using a calculation in my query. ...
3
by: BD | last post by:
Hi, folks. Sorry about this - I have been R'ing all TFM's I can find, but am just getting more frustrated. Background: db2 UDB 8.1 on Windows. I'm quite new to db2, but have several...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.