The search in the Empirum Management Console is based on SQL Queries. These SQL queries can be edited, and customized to fit your necessities. Thus, SQL queries which cannot be created via the search dialog are also possible.
This is how you edit an SQL query:
- Right-click on a filter (e.g. Unassigned Computers or All Devices) and in the context menu select Search Computer..., Search User..., Search Handhelds..., respectively Search Devices...
or
- Right-click on Configuration Groups or a single configuration group and in the context menu select Search > Computer..., User..., Software... or Classes…
You get to the dialog Search in Filter name, Search in Configuration Groups or Search in Name of the configuration group:
- If you wish to change the SQL query of a stored search profile, select a search profile in the Name field.
- When opening a new search, the default parameters are always preselected. If you wish, change these search parameters.
- Click on Query in order to open the dialog for editing the SQL query.
.png)
-
OK. Executes the specified SQL query and closes the dialog.
When leaving the dialog via the OK button, a verification takes place, whether the current SQL query corresponds to the one generated from the parameters in the Search dialog. If yes, then the corresponding parameters are displayed, and the search can be further modified via the parameters. If the SQL query no longer corresponds to the original query which was generated from the search parameters, the fields for entering search parameters in the search dialog can no longer be modified. The search can only take place via the specified SQL query, and modification is only possible via the SQL Query button. - Cancel. If the dialog is quit via the Cancel button, then the status of the last pressing of OK is reset.
- Reset. This button resets the SQL query, as it had been originally generated by specifying the search parameters via the search dialog. If the dialog is quit via the Reset button, then the parameters in the search dialog can be modified again. This is also valid for instance for saved search profiles, which are opened again.
-
OK. Executes the specified SQL query and closes the dialog.
- Edit the SQL query as you wish.
-
Example: Display all computers assigned to configuration groups, which have the word "Test" in their name.
SELECT clients.client_id as client_id, clients.name as computer, clients.domain as domain, bDelete, 'CComputerGroupTree' as parent, CompConfGrComp.TreeID as treepath, CompConfGrComp.TreeID as treeid FROM clients, CompConfGrComp, TreeDefinition WHERE clients.client_id = CompConfGrComp.ComputerID AND (CompConfGrComp.ChangeFlag&32) != 32 AND TreeDefinition.ID = CompConfGrComp.TreeID AND TreeDefinition.Name LIKE ‘%Test%’
-
Example: For the search for computers with a certain name, the SQL query is extended with "AND clients.name LIKE '#$#Computername#$#'":
SELECT clients.client_id as client_id, clients.name as computer, clients.domain as domain, bDelete, 'CComputerGroupTree' as parent, CompConfGrComp.TreeID as treepath, CompConfGrComp.TreeID as treeid FROM clients, CompConfGrComp WHERE clients.client_id = CompConfGrComp.ComputerID AND (CompConfGrComp.ChangeFlag&32) != 32 AND client_id IN (SELECT client_id from clients where name LIKE '%' AND clients.name LIKE '#$#Computername#$#')
-
Example: Display all computers assigned to configuration groups, which have the word "Test" in their name.
- Click on OK in order to close the dialog.
- In the Search dialog, click on Search in order to execute the edited SQL query.