Where Clause Examples

Who displays
TheDepartment = 'IT'
Employees with their Department set to "IT".
TheTeam = 'Helpdesk'
Employees with their Team set to "Helpdesk".
TheDepartment <> 'Human Resources'
Employees whose Department field is NOT "Human Resources".
TheDepartment = 'Finance' OR TheTeam = 'Helpdesk'
Employees who have their Department set to "Finance" OR with Team set to "Helpdesk" .
 
This clause returns two sub-groups of employees; those in the Finance Department as well as those employees in the Helpdesk Team.
TheDepartment = 'Finance' AND TheCountry = 'UK'
Employees with their Department set to "Finance" AND Country set to "UK".
 
This clause will not return employees in the Finance department who do not have Country set to the UK.
TheDepartment IN ('IT','Finance')
Rather than finding employees in a list of departments by entering
TheDepartment = 'IT' OR TheDepartment = 'Finance'
the "IN" function can be used.
 
In the example, the system returns any employee with their Department set to any of the values within the brackets.
 
You can enter as many values as necessary within the brackets.
 
Separate each value with a comma.
TheDepartment NOT IN ('IT','Finance')
Employees who do NOT have their Department set to any of the values within the brackets.
 
This is useful when you have many departments in your organisation, and rather than entering the 15 or 20 values that you do wish to return, you can use this clause to exclude the couple of departments whose employees you do not want to be returned.
 
You can enter as many values as necessary within the brackets.
 
Separate each value with a comma.
TheLineManager = 'Peters, Simon (10)'
Employees with Line Manager on their Contract tab set to this manager.
 
Enter the line manager Where Clause in this format:
 
LM = 'Surname, KnownAsName (EmployeeNumber)'
 
Make sure to enter the manager's Surname, Known As and Employee Number in the Where clause exactly as they are on the manager's Personal tab.
TheLineManager IN ('Abbey, Victoria (62)','Peters, Simon (10),'Beck, Lana (208)')
This clause returns employees whose line manager is any of the managers within the brackets.
 
You can enter as many values as necessary within the brackets.
 
Separate each value with a comma.