SQLTeam.com | Weblogs | Forums

EXEC sp_MSforeachdb


USE [?] 
1 Like

Thanks. That worked!

you keep deleting your questions so I dug it up for ya. But do you know why it worked is the bigger question

Yes. By adding the [?] in brackets that surrounds the db name with brackets to enable databases with spaces or special characters etc to be found. Oh, I deleted it because I found the solution just about the time you posted. Thanks for your help.

There is no need to delete it. Others can benefit from your question and answers given. If u find the answer post it back by replying to your own question..its up to you, that way you also contribute to the form by providing answers and solutions