Fatkhan Fauzi Fatkhan Fauzi - 1 year ago 76
SQL Question

SQL Server - how to use like keyword in records that have period in the middle of value

I have below records

example records

but when i tried to do query

where FullName like '%Gd. Mahendra%'
, it doesn't return any result.

Why ?

it should return the first row, shouldn't it ?

Answer Source

Apparently the problem is:

The value that's been sent by the request is different from the actual record.
It's because the html doesn't use <pre> tag, which is able to render multiple spaces. Then the user just copyies the rendered value that doesn't have multiple spaces. That's why it can't get the correct result.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download