I'm new to ServiceNow but I know SQL
and it just doesn't make sense that I was unable top find such a simple query example for ServiceNow on their official site and google.
Is there any way for JOIN
or just checking if X field from table 1 equals Y field from table2?
Example:
I have 2 tables, companies and users, and I need to "SELECT
" all users that work in London. In users table i have a field 'company_name
' and in companies table I have fields company_name
and city
.
In SQL I could solve it with simple query like:
SELECT u.* from users u, companies c
WHERE u.company_name = c.company_name and c.city = 'London'
or with JOIN:
SELECT u.* from users u
LEFT JOIN companies c on u.company_name = c.company_name
WHERE c.city = 'London'
How to do this in ServiceNow? Thanks