Strange Script error

  • Scripting a table using Sql 2005 Management studio of a Sql 2000 table & then trying to run the script on either 2005 or 2000

    CREATE TABLE [dbo].[Primes](

    [Prime] [int] NOT NULL,

    CONSTRAINT [PK_Prime] PRIMARY KEY CLUSTERED

    (

    [Prime] ASC

    )WITH(PAD_INDEX = OFf, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY]

    Error Received from 2005 Management Studio

    Msg 170, Level 15, State 1, Line 6

    Line 6: Incorrect syntax near '('.

  • if the database is version 80, the script is not valid for the part i highlighted below...that part is 2005 /90 database only:

    CREATE TABLE [dbo].[Primes](

    [Prime] [int] NOT NULL,

    CONSTRAINT [PK_Prime] PRIMARY KEY CLUSTERED

    (

    [Prime] ASC

    )WITH(PAD_INDEX = OFf, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY]

    Error Received from 2005 Management Studio

    Msg 170, Level 15, State 1, Line 6

    Line 6: Incorrect syntax near '('.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Ok Thanx!

    I'll have to watch that when scripting using Studio versus EM

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply