u can have only one PK per table, why do u need three pk ? if you are looking for a combined primary key try like this
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ProductDetail](
[ID] [int] IDENTITY(1,1) NOT NULL ,
[ItemNumber] [nvarchar](255) NOT NULL ,
[Product_Number] [nvarchar](255) NOT NULL ,
[CaseUPC] [ntext] NULL,
[UnitUPC] [nvarchar](255) NULL,
[Description1] [ntext] NULL,
[Description2] [ntext] NULL,
[PackSize] [nvarchar](255) NULL,
[UnitsPerCase] [int] NULL,
[Quantity] [numeric](18, 0) NULL,
[P_EFF_Date] [datetime] NOT NULL,
[P_END_Date] [datetime] NULL,
[DIS_Date] [datetime] NULL,
[Case_Weight] [float] NULL,
[Case_CF] [float] NULL,
[Case_Layer] [numeric](18, 0) NULL,
[Layer_Pallet] [numeric](18, 0) NULL,
[OD_DL] [float] NULL,
[OD_DW] [float] NULL,
[OD_DH] [float] NULL,
[Pallet_DL] [float] NULL,
[Pallet_DW] [float] NULL,
[Pallet_DH] [float] NULL,
[Shelf_Life] [numeric](18, 0) NULL,
[ProductLine] [nvarchar](255) NULL,
PRIMARY KEY CLUSTERED
(
[ID] ASC,[ItemNumber] asc, [Product_Number] asc
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
Main Topics
Browse All Topics





by: angelIIIPosted on 2009-11-03 at 11:38:13ID: 25732641
that needs to be 1 primary key over the 3 columns, the syntax needs to be different:
also note that with sql 2005: don't use TEXT/NTEXT, but VARCHAR(MAX) and NVARCHAR(MAX).
the error message is because you create the primary key as clustered by default, which makes the row size is a problem.
anyhow, make the ID primary key, the other fields just a unique index (after table) creation