Link to home
Create AccountLog in
Avatar of motioneye
motioneyeFlag for Singapore

asked on

another partition function failed to create

Hi,
I already created a partition function as below

CREATE PARTITION FUNCTION partfunc (int) AS
RANGE LEFT FOR VALUES (1000, 2000, 3000, 4000, 5000);

and its being used already and now I want to create another partition function wit use of data type (varchar)

CREATE PARTITION FUNCTION tvpartfunc (varchar) AS
RANGE LEFT FOR VALUES (100, 200,300)
GO

but this statement above return me an error below

Msg 7708, Level 16, State 1, Line 1
Duplicate range boundary values are not allowed in partition function boundary values list. Partition boundary values at ordinal 1 and 2 are equal.


Is that means only one partition function can be created at database?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of motioneye

ASKER

Try with the statement below

CREATE PARTITION FUNCTION tvpartfunc (varchar) AS
RANGE LEFT FOR VALUES ('100', '200','300')

and getting error below

Msg 7720, Level 16, State 1, Line 1
Data truncated when converting range values to the partition function parameter type. The range value at ordinal 1 requires data truncation.