G Y

G Y

  • 1.2k
  • 229
  • 43.9k

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))';