• Use the information_schema.tables view to help you write a script that does what you need. I do this regularly with selects similar to select 'first part of text ' + table_name + ' rest of text' from information_schema.tables where criteria for table names.

    Run the script to text and then copy the output to a query window and execute. We have computers, let htem do the hard, repetitive work.