I have a text field in SQL Server 2005 and it has text like this:
'...this is a [word] that we know...'
I'm trying to search for all records that have '[word]' in that field. So far this works to find '[word':
but this does NOT work to find '[word]':
What am I doing wrong in the second select statement?
Have a read of http://msdn.microsoft.com/en-us/library/ms179859.aspx
What's happening when you're using the square brackets is that you're defining character classes. So in the second example, it uses the outer set of square brackets to mark out a character class that is:
What you want is to use an
answered Oct 28 '09 at 12:00 PM
Melvyn Harbour 1 ♦♦