I am trying to query a database table to return all records where the firstname column contains the characters " "
.
For example Lars-Erik "Molle"
.
I tried this:
SELECT * FROM [bgtest].[dbo].[cuscon] WHERE firstname LIKE '%Lars-Erik%'
and that returned the record this was just me making sure I was doing it right then I replace the Lars-Erik
with ""
and ofcourse as it will now look like '%""%'
it doesn't like it and returns nothing.
Any ideas I've tried CONTAINS and LIKE and can't figure out a way to do it.
Thanks
It looks like you need query something like:
SELECT * FROM [bgtest].[dbo].[cuscon] WHERE firstname LIKE '%"%"%'
Because %""%
will search for two subsequent "
characters only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With