ruby - Mysql compare string without spaces with db-field with spaces -
i have few fields must compare mysql fields: example:
0092s40050
but in db have
0 092 s40 050
they equal, spaces, , without them...... how mysql query on ruby?
my question little bit same as: mysql format string when compare
if understand question correctly can in mysql
class="lang-sql prettyprint-override">select * mytable replace(mycolumn, ' ', '') = '0092s40050'
or
class="lang-sql prettyprint-override">select * mytable replace(mycolumn, ' ', '') '____s50%'
here sqlfidlle
mysql ruby space
No comments:
Post a Comment