Machine Smart Label based on domain user name.
I'm trying to create a Smart Label based on the user login ID for multiple users. Here's the SQL code I have so far.
select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1
where (( USER_NAME rlike 'ksmith|jdoe|lhe'))
It seems to work great, except using the operator "rlike" returns machines with login names for lhe, lheneger, lhennesy, etc. If I use the oporator "=" instead of rlike, the query returns nothing.
How do I make this query work correctly, returning only the names that match exactly?
Thanks in advance.