Undocumented System Procedure 'sp_MSforeachtable' and the @whereand parameter
I'm attempting to use the undocumented system procedure sp_MSforeachtable. But I need to restrict the affected tables to those that start with "smp" and that are in the "dbo" schema. I was able to find how to find procedures that start with "smp". I simply do: sp_MSforeachtable @command1=' print ''?''', @whereand=' and name like ''smp%...