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.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Table partitioning on VARCHAR field

Author  Topic 

sql_server_dba
Posting Yak Master

167 Posts

Posted - 2012-01-05 : 09:45:12
Experts..need some help with table partitioning. I have read that the table partitioning can be done with in the ranges of LEFT or RIGHT for integers/DATETIME fields. What if we want to partition using a field that is VARCHAR(2)? I know if there is only one letter(like a, g, m, r) then it would be very easy but what if we have two letters like (AK, CP, DL, EN, LT, NX)?

Any help would be highly appreciated.

Thanks.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-05 : 10:29:20
It will still put values into different partitions based on their alphabetical sequence

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sql_server_dba
Posting Yak Master

167 Posts

Posted - 2012-01-05 : 11:53:50
So is it going to compare the first letter?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-05 : 12:34:37
nope...the value as a whole

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -