I'm more familiar with Oracle than SQL Server, so pardon my ignorance. As in many situations, I know what I want to do, but not what its called. Is there a way for T-SQL to evaluate whats in a declared variable?
For example, something like:
Declare @MyDatabase varchar(30)
SELECT @MyDatabase = 'SwitchTo'
Use @MyDatabase
Go
TIA
AndreQ