I have 2 tables that are using automatic list partitioning on an ID field. The first table is the live table used in queries and the second is a stage table that is for loading the refreshed data on a daily basis. What I'm needing to do is to compare the list partition values in the stage table to the live table to see if there are new partition values that need to be added to live table so that the new data for these values gets loaded in the live table when doing a partition exchange between the 2 tables.
Has anyone done this before and can share how they did it?