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?
motioneyeAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
any better with this:

CREATE PARTITION FUNCTION tvpartfunc (varchar) AS
RANGE LEFT FOR VALUES ('100', '200','300')
0
 
SQL_SERVER_DBAConnect With a Mentor Commented:
You will need to pass varchar ie strings if thats what your going to declare them as.
0
 
motioneyeAuthor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.