Hiding columns and filtering data
Last modified: April 5, 2024
Query Builder delivers multiple ways to hide columns and filter data in the grid. Both column-level and row-level filtering are available.
Hiding columns
Query Builder offers several ways of hiding columns:
- Remove columns from your SELECT statement
- Hide columns using the Visible Columns dialog
- Use the Remove from output button on the Selection tab
- Clear the checkboxes on the Query Builder diagram
Remove columns from your SELECT statement
You can remove the required columns from your SELECT statement. For instance, let’s remove LoginID, OrganizationNode, and OrganizationLevel from the following query:
SELECT
BusinessEntityID, NationalIDNumber, LoginID, OrganizationNode, OrganizationLevel, JobTitle, BirthDate, MaritalStatus, Gender, HireDate
FROM AdventureWorks2019.HumanResources.Employee
Thus our query becomes as follows:
SELECT
BusinessEntityID, NationalIDNumber, JobTitle, BirthDate, MaritalStatus, Gender, HireDate
FROM AdventureWorks2019.HumanResources.Employee
Then we click Execute to get the results.
Hide columns using the Visible Columns dialog
Right-click a column header and select Visible Columns on the shortcut menu to open the Visible Columns dialog. Clear the checkboxes next to the columns you want to hide from the grid and click OK.
Use the Remove from output button on the Selection tab
Click Remove from output on the Selection tab.
Clear the checkboxes on the Query Builder diagram
Clear the checkboxes next to the required columns on the Query Builder diagram.
Note
Learn more about building queries on diagrams in Working with diagrams.
You can combine the abovementioned hiding methods.
Filtering data
Query Builder offers several ways of filtering data:
- Add a WHERE condition to your query
- Enter your filter condition for the required column on the Selection tab
- Enter your filter condition for the required column on the Where tab
- Use the Filter button
- Apply Quick Filter
Add a WHERE condition to your query
You can add a WHERE condition to your query to filter data. For instance:
SELECT
BusinessEntityID, NationalIDNumber, LoginID, OrganizationNode, OrganizationLevel, JobTitle, BirthDate, MaritalStatus, Gender, HireDate
FROM AdventureWorks2019.HumanResources.Employee
WHERE OrganizationLevel < 3
If we execute this query, we will get the following results:
Enter your filter condition for the required column on the Selection tab
On the Selection tab, enter the filter condition for the required column in the Where field. When the row-level filtering is applied, a corresponding icon will appear on the diagram.
Enter your filter condition for the required column on the Where tab
Alternatively, enter the filter condition on the Where tab. Similarly, a corresponding icon will appear on the diagram.
Use the Filter button
Click the Filter button located in the upper right corner of the required column header.
Apply Quick Filter
Select Quick Filter on the shortcut menu. Then select one of the predefined options or select Condition to open the Filter Editor and customize your condition.
Note
Data sorting and filtering can be performed either on the client or on the server side. To learn more about it, refer to Server-side and client-side sorting and filtering.