• This is one of the few cases where dynamic SQL should be considered.

    Take a look at this [/url]article on the subject, particularly the 'dynamic SQL' bit.