My current query searches for user ids but report users would rather look up users by First name or Last name. With our databases if the names aren't spelled exactly as it is in the database it won't return a responce. How would I write a variable that would return names close to what was typed?
select a.USER_ID, a.USER_NAME, a.DEVICE_SW, a.SUPERVISOR
from CSI.SY_USER a
where (a.USER_INACTIVE_DATE is null)
and a.KRONOS_ID <> ' '
and a.supervisor in ('00APOP00',
and (a.user_ID = @variable('USER ID (Enter Single ID or ALL)')
@variable('USER ID (Enter Single ID or ALL)') = 'ALL')
order by a.SUPERVISOR,a.USER_ID, a.USER_NAME