March 24, 2009 at 8:57 am
CREATE TABLE ZZDataBaseAdminLog (
[ID] [int] IDENTITY(1,1) NOT NULL,
[ID2] [int] NOT NULL,
[TableName] [varchar](150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Ilog] [int] NOT NULL,
[Slog] [int] NOT NULL,
[Stamp] [datetime] NOT NULL CONSTRAINT [DF_ZZDataBaseAdminLog_Stamp] DEFAULT (getdate()),
CONSTRAINT [PK_ZZDataBaseAdminLog] PRIMARY KEY CLUSTERED ([ID] ASC)
WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY]
According to T-SQL help there should be nothing wrong with this, but I get syntax error near '(' after Create Table ZZDataBaseAdminLog -
using SSMS remote and Query Analyzer on the Server.
Any help appreciated - this is driving me nuts
Howard
March 30, 2009 at 11:28 am
Take out the '(' after Create Table ZZDataBaseAdminLog ???
March 30, 2009 at 11:46 am
I did a cut and paste of the code above, and had no issues with it.
March 30, 2009 at 3:38 pm
The statement is valid for SQL 2005 but not for SQL 2000 due to the "WITH (IGNORE_DUP_KEY = OFF)" part. remove this part and it will work in SQL 2000 also.
March 30, 2009 at 4:04 pm
Oh well, guess 80 compatibility mode allows some things that the actual SQL Server 2000 engine won't. It worked fine on my SQL Server 2005 system with a database in 2000 compatibility mode.
March 31, 2009 at 2:30 am
that was it.
Thanks Howard.
PS. I put a previously SS2005 database back to 2000 mode and the 2005 code worked as well.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy