select login_id,first_name + ' ' + last_name as name,'0' as evuda,count(*) over () as [record_count]
from userinfo
where comp_id = @LoginCompId
and first_name like '%'+ isnull(ltrim(rtrim(@UserName)),first_name) +'%'
or last_name like '%'+ isnull(ltrim(rtrim(@UserName)),last_name) +'%'
from userinfo
where comp_id = @LoginCompId
and first_name like '%'+ isnull(ltrim(rtrim(@UserName)),first_name) +'%'
or last_name like '%'+ isnull(ltrim(rtrim(@UserName)),last_name) +'%'