This?-- sample tabledeclare @Sample table (countrycode varchar(2), countryalias varchar(255))-- sample datainsert @Sampleselect 'NL', 'nederland' union allselect 'NL', 'netherlands' union allselect 'NL', 'paysbas' union allselect 'US', 'unitedstatesofamerica' union allselect 'US', 'america'-- show sample dataselect * from @Sample--Also I have a string e.g. "kevin lives in the United States of America".-- solutionselect * from @Samplewhere replace('kevin lives in the United States of America',' ','') like '%'+countryalias+'%'
Too old to Rock'n'Roll too young to die.