Is there a way to find the numer of the partition that was last created?
I want to use the swap technique with partionig like this:
ALTER PARTITION SCHEME PSMonthly NEXT USED [PRIMARY]
GO
ALTER PARTITION FUNCTION PFMonthly () SPLIT RANGE (20040601)
GO
[snip]
ALTER TABLE PseudoPartition_200405 SWITCH TO PartitionTable PARTITION [???]
GO
The problem is that I have to find [???] dynamicly.
Thanks