Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    21

    Unanswered: dumb question, but I need help

    Help people,

    I am trying to figure out the syntax to declare a @table varible with a primary key clusterd

    Hence,

    declare @RANK_FIGROSS_TEST table
    {
    RANK int NOT NULL IDENTITY (1, 1)|PRIMARY KEY CLUSTERED,
    FINAME nvarchar(255) NULL,
    FIGROSS decimal (10,2)
    }

    But I am not having any luck, anyone know what I am missing ??

  2. #2
    Join Date
    Jul 2003
    Location
    Penang, Malaysia
    Posts
    212
    should be ( and not { and no | for the primary key declaration

    here is the code modified:

    Code:
    declare @RANK_FIGROSS_TEST table
    ( 
    RANK int NOT NULL IDENTITY (1, 1) PRIMARY KEY CLUSTERED,
    FINAME nvarchar(255) NULL,
    FIGROSS decimal (10,2))
    Patrick Chua
    LBMS ( Learn By My Self) NPQ ( No paper Qualification )

  3. #3
    Join Date
    Nov 2003
    Posts
    21

    thanks = )

    that worked, told you it was a stupid question, just couldn't see it.

    Thanks

  4. #4
    Join Date
    Oct 2003
    Location
    Ireland
    Posts
    54
    no such thing as a stupid question :-) we all have to learn somehow

  5. #5
    Join Date
    Jul 2003
    Location
    Penang, Malaysia
    Posts
    212
    hmm..... I did even more stupid "ER" things than u ever imagined!!!
    Patrick Chua
    LBMS ( Learn By My Self) NPQ ( No paper Qualification )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •