0xDBE basic usage

I'm looking for tips / tricks for everyday usage of 0xDBE.  Thougth maybe a general discussion of tips and tricks that everyone has figured out may help out several users

I am using MSSQLServer and have been using management studio for database management, just for some background.  

What I am trying to figure out right now is how to just query a table without having to fully qualify it.  For example, say I have several databases connected.  I want to query all employees on the employee table in myDB.dbo.employees.

I can do this by using "SELECT * FROM myDB.dbo.employees"

but what i want to do is query using "SELECT * FROM employees"

In management studio I can do this just by selecting the schema, then right-clicking for a new query.  

Also, if anyone knows of a keyboard shortcut to execute a query.  I'm sure there is one but I don't know what it is.

0
8 comments
Avatar
Permanently deleted user

I can answer the last one:  Highlight the command(s) and press CTRL-Enter

0
Avatar
Permanently deleted user

Thanks,  that helps.  

For the first one, while it isn't exactly what I want for simple everyday querying, I can use "USE myDB" prior to the select statement.  I'm looking for something that explicitly does that without me stating it in the query at all.

0
Avatar
Permanently deleted user

I'm looking for the same thing

0
Avatar
Permanently deleted user

Not a perfect solution, but:
CTRL-SHIFT-ALT-C
Copies the fully-qualified table name to the clipboard.  Then you can use CTRL-C to paste it in.

you need a lot of finger dexterity to get that right...to quote Maryln Manson:
"I wasn't born with enough middle fingers".

0
Avatar
Permanently deleted user

Another thing you may want to try is to "Resolve Unqualified References".  Available in the "Manage Data Sources/Schemas and Tables" tab.
DBOptions.png

0
Avatar
Permanently deleted user

That did it.  Thanks!

0
Avatar
Permanently deleted user

Well, I thought it did it.  After closing the IDE and reopening it fails again.

0
Avatar
Permanently deleted user

I've been just doing "use db_name".  I haven't found a place to click to do the same.

0

Please sign in to leave a comment.