Home Forums SQL Server 2008 SQL Server 2008 - General help with sp_MsForEachDb RE: help with sp_MsForEachDb
Steve Jones - SSC Editor
SSC Guru
Points: 734444
More actions
July 3, 2013 at 9:15 am
#1629569
You can't use ms_foreachdb to insert a parameter into a query that's directly executed. You need to submit a query as a parameter.
Luis has shown you how this would work.