Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Surajit Laha
Starting Member
2 Posts |
Posted - 2009-04-01 : 06:53:09
|
| I want to create partition in one table the following are the syntax have used but last giving some error.1. CREATE PARTITION FUNCTION GLFunction1(int)AS RANGE RIGHT FOR VALUES (1000);result : sucessful2. CREATE PARTITION SCHEME GLScheme1AS PARTITION GLFunction1TO (laha,laha1);result : sucessful3. IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[CRONUS India Ltd_$G_L Entry]') AND name = N'CRONUS India Ltd_$G_L Entry$0')ALTER TABLE [dbo].[CRONUS India Ltd_$G_L Entry] DROP CONSTRAINT [CRONUS India Ltd_$G_L Entry$0]result : sucessful4. ALTER TABLE [dbo].[CRONUS India Ltd_$G_L Entry] ADD CONSTRAINT [CRONUS India Ltd_$G_L Entry$0] PRIMARY KEY CLUSTERED ( [Entry No_] ASC)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [GLScheme1]Result : error.Msg 2726, Level 16, State 1, Line 1Partition function 'GLFunction1' uses 1 columns which does not match with the number of partition columns used to partition the table or index.Msg 1750, Level 16, State 0, Line 1Could not create constraint. See previous errors. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
Surajit Laha
Starting Member
2 Posts |
|
|
|
|
|