Hi,
I have some databases with spaces in the names and so I added some square brackets;
USE master
go
exec sp_MSforeachdb
' IF (''?'' NOT IN (''master'',''tempdb'',''model'',''msdb'',''ReportServerTempDB''))
BEGIN PRINT ''Atualizando estatÃsticas de '' + ''?''
use [?] exec sp_updatestats END';
Thanks for the useful snippet!