I am getting this error whenever I am trying to switch the partition from staging to warehouse table.
ALTER TABLE SWITCH statement failed. Range defined by partition 1 in table 'dbo.table1' is not a subset of range defined by partition 299 in table 'dbo.table2'
Please let me know the workaround to this error if anyone have gone through the same error in the past.
Try this, Dissolve the last range
ALTER PARTITION FUNCTION <functname> MERGE RANGE (<range_of_299>)
Re-create
ALTER PARTITION FUNCTION <functname> SPLIT RANGE (<increased_range_of_299>)
Then try SWITCH.Let me know after you tried
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.