• Well I think I might have it conceptually. Just starting to code it right now...I'll post the final result if everything checks out.

    Just create a partition function on two values 1 & 2 let's say but that really doesn't matter.

    Before I load the staging table I'll just check what the current value is in the main table and populate the staging table with the opposite number using a case statement. Then when I partition the main table the one partition will remain empty ready to be switched with the valid numbered range from the staging table.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned