HI, I want to write partiton in sql server 2008 for my fleet management system. I want to write a partition function such that --values (vehicle number) like for example mh-30-q-126,mh-30-a-126,mh-12-fc-126 should be moved to respective partiton, depending upon middle values like ,q,a,fc respectively
My trial function:-
CREATE PARTITION FUNCTION [partition](varchar(20))
AS RANGE RIGHT
FOR VALUES ('%a%', '%G%', '%Z%')
this function moves all(every value) data to partition 4 .
CREATE PARTITION FUNCTION [partition](varchar(20))
AS RANGE RIGHT
FOR VALUES ('a', 'G', 'Z')
This partition does not satisfy me in terms where i want to sort values which are in middle eg.mh-30-q-126 ..here i want to target value "q" to move to respective partion,,, plz tell tell me how to write this function