?
Solved

another partition function failed to create

Posted on 2007-09-28
3
Medium Priority
?
1,375 Views
Last Modified: 2008-01-09
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?
0
Comment
Question by:motioneye
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 750 total points
ID: 19979570
any better with this:

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

Assisted Solution

by:SQL_SERVER_DBA
SQL_SERVER_DBA earned 750 total points
ID: 19979860
You will need to pass varchar ie strings if thats what your going to declare them as.
0
 

Author Comment

by:motioneye
ID: 19980237
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question