and more in a single search tool across platforms. Read the announcement here. |
03/27/2024 07:31 PM
I need to create a detective rule that identifies users without a specific endpoint. I am using the query below but it seems to return all users. I would like to only identify users without a specific endpoint.
---------------------------------------
a.statuskey=1 and a.id in (select distinct us.userkey from User_accounts us, Accounts cc, Endpoints ep where us.accountkey=cc.id and cc.endpointkey =ep.id and ep.endpointname NOT LIKE 'EndPointName')
Solved! Go to Solution.
03/27/2024 07:36 PM
a.statuskey=1 and a.id not in (select distinct us.userkey from User_accounts us, Accounts cc, Endpoints ep where us.accountkey=cc.id and cc.endpointkey =ep.id and ep.endpointname NOT LIKE 'EndPointName')
03/27/2024 07:44 PM
Thanks but this is the same query I provided.
03/27/2024 07:50 PM
i have changed not in
a.statuskey=1 and a.id not in (select distinct us.userkey from User_accounts us, Accounts cc, Endpoints ep where us.accountkey=cc.id and cc.endpointkey =ep.id and ep.endpointname NOT LIKE 'EndPointName')
03/27/2024 07:53 PM
Thanks, But this change did not return any results.
03/27/2024 08:00 PM
I have validated and it works
a.statuskey=1 and a.id in (select distinct us.userkey from User_accounts us, Accounts cc, Endpoints ep where us.accountkey=cc.id and cc.endpointkey =ep.id and ep.endpointname ='Costar')
03/27/2024 08:11 PM
Validation
a.statuskey=1 and a.id not in (select distinct us.userkey from User_accounts us, Accounts cc, Endpoints ep where us.accountkey=cc.id and cc.endpointkey =ep.id and ep.endpointname = 'Costar')
03/27/2024 08:15 PM
Thanks!
Updated the syntax below and this worked.
a.statuskey=1 and a.id not in (select distinct us.userkey from User_accounts us, Accounts cc, Endpoints ep where us.accountkey=cc.id and cc.endpointkey =ep.id and ep.endpointname LIKE 'EndPointName')