dbTalk Databases Forums  

Select Top X Rows - Opens in Master DB?

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Select Top X Rows - Opens in Master DB? in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Glen
 
Posts: n/a

Default Select Top X Rows - Opens in Master DB? - 03-27-2009 , 09:45 AM






Using SSMS, in the Object Explorer, when I drill down to database D1 and right click on table T1 and choose "Select Top x Rows", the query window that opens is connected to the "master" database, not database D1.

Is there any way to configure SSMS to connect new query windows to the database they are doing the query in?

Thanks,
Glen

Reply With Quote
  #2  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Select Top X Rows - Opens in Master DB? - 03-28-2009 , 02:49 PM






Quote:
Using SSMS, in the Object Explorer, when I drill down to database D1 and right
click on table T1 and choose "Select Top x Rows", the query window that opens
is connected to the "master" database, not database D1.
Yep, known issue, might be improved in a future release if enough people
support it.

http://connect.microsoft.com/SQLServ...spx?FeedbackID
=367434

Quote:
Is there any way to configure SSMS to connect new query windows to the
database they are doing the query in?
Sure, right-click the correct database in Object Explorer, select "New
Query" in the drop-down. Then type "SELECT TOP 25 * FROM table_name", add
an ORDER BY clause, and you're off to the races.



Reply With Quote
  #3  
Old   
Glen
 
Posts: n/a

Default Re: Select Top X Rows - Opens in Master DB? - 03-30-2009 , 04:39 PM



Thanks. I added a vote to that feedback page.

"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote

Quote:
Using SSMS, in the Object Explorer, when I drill down to database D1 and
right
click on table T1 and choose "Select Top x Rows", the query window that
opens
is connected to the "master" database, not database D1.

Yep, known issue, might be improved in a future release if enough people
support it.

http://connect.microsoft.com/SQLServ...spx?FeedbackID
=367434

Is there any way to configure SSMS to connect new query windows to the
database they are doing the query in?

Sure, right-click the correct database in Object Explorer, select "New
Query" in the drop-down. Then type "SELECT TOP 25 * FROM table_name", add
an ORDER BY clause, and you're off to the races.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.