sql - Using wildcard characters while trying to convert from one datatype to another -


i'm trying run sql query involving converting 1 datatype another.

select     convert(char(12),name) name       people       convert(char(12),place) = 'chicago' 

this works. however, i'm not sure how alter query use wildcard characters. imagine following (which not work in current state) -

select      convert(char(12),name) name       people       convert(char(12),place) = '%chicago%' 

please help.

if want use wildcard characters, need use like:

select convert(char(12),name) name  people  convert(char(12),place) '%chicago%' 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -