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 |
chrpeter
Starting Member
31 Posts |
Posted - 2008-04-21 : 16:02:52
|
Is this possible/how is it done?I tried just going through and putting a @DBName.dbo.Table1 in the FROM clause but it said invalid object name @DBName ...I also tried this in a stored proc, but it didn't work either: quote: EXEC('USE ' + @DBName)*SELECT STATEMENT HERE*
Any suggestions? |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2008-04-21 : 16:15:42
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94068 elsasoft.org |
 |
|
chrpeter
Starting Member
31 Posts |
Posted - 2008-04-21 : 16:23:12
|
Awesome, just what I needed thanks |
 |
|
|
|
|