G Y

G Y

  • NA
  • 224
  • 41.8k

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