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 |
|
CoffeeAddict
Yak Posting Veteran
94 Posts |
Posted - 2010-06-17 : 13:31:52
|
| If I'm coding away in Query Analyzer over one database and I need to quickly point to another, how can I do this? I want to run the same queries on Database #1 but right now my query analyzer is focused on all tables in Database #1There is a "Change Connection" icon which works but is there a quicker way such as a keyboard shotrcut or something? |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-06-17 : 14:06:36
|
Databases on the same server?Two ways:1. use databasename..tablename instead of tablename2. type inuse databasenamegoand execute it No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
CoffeeAddict
Yak Posting Veteran
94 Posts |
Posted - 2010-06-18 : 10:19:46
|
Yea I tried the DatabaseName.TableName but that did not work for some reason. Thanks will try the 2nd.quote: Originally posted by webfred Databases on the same server?Two ways:1. use databasename..tablename instead of tablename2. type inuse databasenamegoand execute it No, you're never too old to Yak'n'Roll if you're too young to die.
|
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2010-06-18 : 10:30:10
|
| DATABASENAME.OWNER.TableNameselect col1 from [mydatabase].dbo.mytableJimEveryday I learn something that somebody else already knew |
 |
|
|
|
|
|