G Y

G Y

  • 1.5k
  • 229
  • 43.7k

Soundex search with like operator not working

Jun 24 2020 10:55 AM
 Soundex search with like operator is not working
 
DECLARE @FirstNameToBeSearch VARCHAR(50) = 'Ronald'
select * from table where Country = 'US' + ' and (Firstname like ''' + @FirstNameToBeSearch + '%'' or DIFFERENCE (Firstname,''' + @FirstNameToBeSearch + ''') in (4))';