Where Clause Examples

Where Clause

Who will display

TheDepartment = 'IT'

Employees whose Department field has been set to "IT

TheTeam = 'Helpdesk'

Employees whose Team field is set to "Helpdesk"

TheDepartment <> 'Human Resources'

Employees whose Department field is NOT "Human Resources"

TheDepartment = 'Finance' OR TheTeam = 'Helpdesk'

Employees whose Department is set to "Finance" OR whose Team field is set to "Helpdesk"

This clause will return 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 whose Department is "Finance" AND whose Country is also set to "UK". Any employees in the Finance department whose Country is not "UK" will not be returned by this clause.

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 will return any employees whose Department is set to any of the values within the brackets.

You can enter as many values as necessary within the brackets. Each value must be separated by a comma.

TheDepartment NOT IN ('IT','Finance')

Employees will be returned whose Department is NOT set to any of the values within the brackets.

This can be useful if for example 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 don't want to be returned.

You can enter as many values as necessary within the brackets. Each value must be separated by a comma.

TheLineManager = 'Peters, Simon (10)'

Employees will be returned whose Line Manager field on their Contract tab has been set to this manager.

The line manager Where Clause needs to be entered in the format:

LM = 'Surname, KnownAsName (EmployeeNumber)'

The manager's Surname, Known As name and Employee Number need to be entered 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 will return employees whose line manager is any of the managers within the brackets.

You can enter as many values as necessary within the brackets. Each value must be separated by a comma.