T-SQL sp_msforeachdb example
EXEC sp_msforeachdb ' | |
if ''?'' LIKE ''CMS[_]%'' begin | |
print ''?''; | |
use [?] | |
select setting as TransactionGateway, ''?'' as [Database] | |
from dbo.Setting with(nolock) | |
where Id = ''TransactionGateway'' | |
END | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment