Jeff Moden (3/15/2013)
I suppose you could take what was said two ways. I may have taken it the wrong way.
I was not 100% clear in what I said. I was implying that sp_msforeach(table | Db) falls under the category of dsql and is, therefore not the best option. The newer code I posted still uses dsql but is free of any loops, cursors, RBAR (Hoo-uh).
-- Itzik Ben-Gan 2001