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.

8 comments
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

I'm looking for the same thing

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

That did it.  Thanks!

0
Comment actions Permalink

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

0
Comment actions Permalink

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.