Using Filter Settings Option in SQL Server

In this article I provide a quick overview of how to use Filter Setting in SQL Server. In SQL Server you can filter records from many ways. For example where, like etc. The Filter Setting option is very useful when you have many related tables, Stored Procedures and you're only interested in a specific set of them. So let's have a look at a practical example of how to use the Filter Setting in SQL Server. 

This example is in SQL Server Management Studio.

Now select a table and right-click on it. Select "Table Folder" then right-click then choose a filter then "Filter settings".

Filter-Setting-in-SQL-Server1.jpg

Now click on the "Filter Settings" and the Filter Settings dialog box will be opened.

Filter-Setting-in-SQL-Server2.jpg

The Filter Settings window shown above contains a table with three fields.

  1. Property: Displays the property to filter on such as Name, schema, Owner, Creation Date.
  2. Operator: Select the way that the filter applies the value to the property.
  3. Value: Type the value to compare to the property.

Operator with Name, Schema Property

There are the following options:

Filter-Setting-in-SQL-Server3.jpg

  1. Equals: The filter shows items where the property and the value are an exact match.
  2. Contains: The filter shows items where the property contains the value. The property may contain other text.
  3. Does not contain: The filter shows items that where the property does not contain the value.

Operator with Owner Property

There are the following options:

Filter-Setting-in-SQL-Server4.jpg

  1. Equals: The filter shows items where the property and the value are an exact match.
  2. Does not equal: The filter shows items where the property and the value are not an exact match.

Operator with Creation Date Property

There are the following options:

Filter-Setting-in-SQL-Server5.jpg

  1. Greater than: Available for dates, this filter shows items whose date is after the value provided.
  2. Greater than or equal: Available for dates, this filter shows items whose date contains or is after the value provided.
  3. Between: Available for dates, this filter shows items whose date is between two dates provided. Select "Between" and press TAB to add another row allowing entry of the second date.
  4. Not between: Available for dates, this filter shows items whose date is before or after two dates provided. Select "Not Between" and tab out of the Operator column to add another row allowing entry of the second date.

Now suppose you want to search the table according to name, such as: "registration".

Filter-Setting-in-SQL-Server6.jpg

Now click on the "OK" button. And click on the + sign to expand the table folder. It will show the search result related to the registration tables.

Filter-Setting-in-SQL-Server7.jpg

Similarly you can search a Stored Procedure.

 

Up Next
    Ebook Download
    View all
    Learn
    View all