Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2005 Management Studio - Filters on Tables, Views, Etc 1

Status
Not open for further replies.

kjv1611

New member
Jul 9, 2003
10,758
US
Does anyone know of any way to permanently save filters in place that you would normally set on sets of tables, views, etc, within a particular database?

Here's what I am talking about:
[ol][li]I come in in the morning, and open SQL Server[/li]
[li]For one database, I totally use views, and there is a certain set of views which I use 95% of the time.[/li]
[li]Currently, I select "Views" under said database, wait for them to populate, then click the "filters" button. Depending upon how busy things are at the moment, this CAN take a while - maybe 30 seconds, I suppose.[/li]
[li]I then do the same for a different database where I use tables, and a certain subset of those 99% of the time.[/li][/ol]

So what I would like to do is find some way to automatically set those filters - either through some sort of query, or through an options type menu. I've asked around here at work, and from what I've gathered there, there is no way, but I thought I'd ask around here just to be sure.

Thanks for any thoughts or suggestions on the topic, even if it's truly unanswerable.
 
Okay, that's DEFINITELY got my interest! thanks for the link! I'll have to give it a look for sure! Once I do (assuming I don't forget), then I'll post back with some results.
 
Hmm, well, so far no luck. Only a handful of folks here at work have visual studio at all, and I'm not one of them so far. Maybe I can give it a try at home with the express editions... we'll see. It looks like you have to have visual studio to do any thing along these lines.
 
It looks like there is an MSI you can download if you want to just install the add-in. I realize it wouldn't be as much fun as writing your own... and this add-in may not be what you are looking for, but it sounds like it might be a nice alternative.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Well, I installed it, and it simply extracted 3 .dll files into a new folder. Was I missing something on the install? I've never used an add-in for SSMS in the past, and I didn't immediately notice any options in any menus that sounded like add-in management.
 
I just now installed this. After restarting SQL Server Management Studio, the add-in is already installed and running.

To use it, press CTRL-F3.

or

Click Tools -> DB Object Quick find.



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Yeah, I just didn't see it.

Well, something's wrong on my end, or just possibly it's totally blocked, as far as usage rights I suppose. I can get it to open the message-box looking deal, but I can't do anything with it. I can't even close it once open. If I re-open, it's still under Tools, but it's not doing anything.

Oh well, it's probabaly a rights thing. I'll try to remember and at least try it out at home, and then if I think it's worth it, I may request access to what I need here, or either request it be added by an IT admin. We'll see.
 
Try this. It's a script that creates a table of tables and picks the most recent tables from today and yesterday.

--Partitioned view as defined on Server1
CREATE VIEW Customers
AS
--Select from local member tables
SELECT * from tablename1;
select * from tablename2;
--Select from local member tables
SELECT * from tablename1
union all
select * from tablename2
union all
-- create the tables and insert the values
CREATE TABLE tablename1
(
tableID int primary key check (tableID Between 1 and 200),
tableDate date
);
CREATE Table tablename2
(
tableDate int primary key check (tableDate Between '02-Apr-10' and '01-Apr-10'),
tableUser table
);
select * from tablename1
union all
select * from tablename2
union all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top