I have a stored procedure that accepts a comma separated list of values as a parameter
SELECT *
FROM users
WHERE username IN (SELECT value FROM STRING_SPLIT( @userList, ','))
I want to change the where clause to use a like for each value
SELECT *
FROM users
WHERE username LIKE 'value1%'
OR username LIKE 'value2%' ...
I'm not sure how to go about this. Any ideas?