string - SQL Check if a text contains a word -


i have text,

'me , against world' // false 'can have email address'  // true 'this an'  // true 'an' //true 

i want check whether word an inside string.

how check if text contains specific word in sql? can't add full-text catalog. otherwies could

select * table contains(text, 'an') 

here's 1 approach.

declare @table_name table (    column_name varchar(50) );  insert @table_name (column_name)   values ('me , against world')        , ('can have email address')        , ('this an') ;  select column_name   @table_name  ' ' + column_name + ' ' '% %' ; 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -