Hi All,
i want to create multiple partition schema on a single table.
for example - i need to create partition base on region id and Territory Id.
Regards,
Manish
Technology Tips and News
Hi All,
i want to create multiple partition schema on a single table.
for example - i need to create partition base on region id and Territory Id.
Regards,
Manish
Hi,
please any body can replay it is possible or not.
Regards,
Manish
AFAIK you cant do table partitioning based on multiple columns in a straightforward way
However there are some workarounds
1. Using a lookup table
Create a lookup table with a identity field that holds the composite column value combinations ie regionId and TerritoryId in your case.
In your main table add a column for the lookup table reference id and then make the partitioning based on this new reference column.
2. Add a persisted computed column by applying HASHBYTES function over values of two fields ie regionId and TerritoryId based on which you want to partition and use this column for partitioning the table
See HASHBYTES usage here
http://visakhm.blogspot.com/2014/06/ssis-tips-implementing-scd.html