dynamic sql

Of course, if you think you need to do this, your partitioning is probably setup wrong.