Solved

SQL Server Management Studio Multiple Filters in Object Explorer?

Posted on 2014-09-14
18
1,766 Views
Last Modified: 2014-09-26
Is there really no add in or functionality that will allow you to have multiple filters in Management Studio Object Explorer? Mainly tables. I want to see all tables that begin with or contain XXX and all that have YYY.

Is it really hard?
0
Comment
Question by:mike1142
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 3
18 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 40321901
If your question is 'how can I display in SSMS, treeview on the left side, Tables, only tables based on a custom filtering of my choice', then the answer is no, SSMS currently does not have that functionality.

Spell out for us why you're asking this, and perhaps we can give you a workaround.
0
 

Author Comment

by:mike1142
ID: 40321916
I have a query in an 8000 table database. I am trying to tune the query. I would like to look at the indexes that are on several of the tables. There is no commonality amongst all of the tables in the query that would work for the filtering function. Excel for instance has a text filter that allows at least 2 filters. Outlook has an advanced filter function to add basically unlimited filters though I find it clumsy.

It's not as simple as just the indexes though. It's helpful to have all of the features of object explorer available , filtered to just the tables I need. I am reasonable though one or two extra I could live with.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40322085
This is why you should not be using the GUI for this.  Instead I would suggest you use a system view. as in:
SELECT *
FROM sys.tables
WHERE name like 'yourfiltergoeshere'

A better approach is to design your tables using schemas, but I suspect it is too late for that.
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

Author Comment

by:mike1142
ID: 40322270
Can you be more specific? Are there a set of queries/tables that will give me all the information I need?

I did not design the database so sorry about the schema thing.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40324353
Can you be more specific? Are there a set of queries/tables that will give me all the information I need?
Sorry I thought I was being specific.  for example, if you want to see all the tables that start with say "Doc" you would do something like this:
SELECT name
FROM sys.tables
WHERE name LIKE 'Doc%'
0
 

Author Comment

by:mike1142
ID: 40324449
And that gives you as much information as the GUI does?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40326833
Why don't you try it and tell me what you are missing?
0
 

Author Comment

by:mike1142
ID: 40326893
SELECT name
FROM sys.tables
WHERE name LIKE 'Doc%'

Gave me no records so I guess I am missing all of the tables, all of the indexes, all of the columns, all of the data types attached to the columns, all of the statistics, all of the keys, all of the constraints and all of the triggers..
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40326978
Here was your original question:
I want to see all tables that begin with or contain XXX and all that have YYY.
If that is the case than the following query will return all the tables that match:
SELECT name
FROM sys.tables
WHERE name LIKE '%XXX%'  OR name '%YYY%
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40326982
Gave me no records so I guess I am missing all of the tables,
It merely tells you that you do not have any tables that start with 'Doc%'
0
 

Author Comment

by:mike1142
ID: 40326985
Anthony, you are being obtuse. That was not the original question. I have contacted administration, they have seen your comments. I am closing out the question and will entertain no more discussion from you.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40327030
So for starters, I have dibs on 'No, you can't do that in SSMS' as the answer here.

>There is no commonality amongst all of the tables in the query that would work for the filtering function.
Please explain this statement in greater detail, as it seems to imply that even if there was a filtering function it wouldn't work too well for this purpose.

>Excel for instance has a text filter that allows at least 2 filters. Outlook has an advanced filter function to add basically unlimited filters though I find it clumsy.
Comparing an Office product to SQL Server SSMS is not a valid comparison.  Way different product teams.

Perhaps if you really need this, a better idea would be to restore a COPY of this database from a backup, with all the tables, then programmatically delete the ones you're not going to use until all that's left if what you want to work with.

or

Script out the objects you do want to work with into a Visual Studio 2012 / Database Project, and work out of that UI.
0
 

Author Comment

by:mike1142
ID: 40327514
I've requested that this question be closed as follows:

Accepted answer: 0 points for mike1142's comment #a40327056

for the following reason:

because
0
 

Author Comment

by:mike1142
ID: 40327137
Thank you all for your time. I will seek other avenues of resolution.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40327796
The original answer of 'No, you can't do that' stands, which is a valid answer at Experts-Exchange when it is the correct one.

Anthony's suggestion of various SELECT clauses displays the tables, which is not all that you need as you still need indexes, relationships, etc., but as demonstrated it's not possible in SSMS, so in effect 'This is as close as you can get'.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Copy data to New Year 9 33
I need help using SQL case statements in where clauses 3 25
Need help with a query 14 39
T-SQL: I need to add an index on a field 5 27
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question