Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
razeena
Yak Posting Veteran
54 Posts |
Posted - 2012-07-12 : 02:36:45
|
| Is it possible to concatenate the dbname passed to the table namedynamically? Below code is throwing error.-------------declare @t1 varchar(100)set @t1 = 'dbname'set @t1 = (@t1)+'.dbo.<mytablename>'print @t1select * from @t1--------------- |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-12 : 09:40:03
|
| why is db changing at runtime? are you trying to iterate through multiple db while executing queries?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|