Use the fuzzy query command LIKE (2) bitsCN.com in SQLServer
When an escape character is placed before a wildcard, the wildcard is interpreted as a common character. For example, to search for strings containing string 5% at any position, use:
WHERE ColumnA LIKE '% 5/%' ESCAPE '/'
In the LIKE clause above, the leading and ending percent signs (%) are interpreted as wildcards, while the percent signs after the slash (/) are interpreted as characters %.
Square brackets ([]) contain only the wildcard character. To search for a break number (-) instead of specifying the search range, specify the break number as the first character in square brackets:
WHERE ColumnA LIKE '9 [-] 5'
The following table shows the usage of wildcards enclosed in square brackets.
Symbol meaning
LIKE '5 [%] '5%
LIKE '5% '5 followed by a string of 0 or more characters
LIKE '[_] N' _ n
LIKE '_ n' an, in, on (and so on)
LIKE '[a-cdf] 'a, B, c, d, or f
LIKE '[-acdf]'-, a, c, d, or f
LIKE '[[]' [
LIKE ']
If you use LIKE to compare strings, all the characters in the pattern string, including the start space and/or trailing space, are meaningful. If the query comparison requires that all rows containing "abc" (there is a space after abc) be returned, the column value "abc" (no space after abc) is not returned. However, this is not the case. Ignore spaces at the end of the expression to be matched by the pattern. If the query comparison requires that all rows containing "abc" (without spaces after abc) be returned, all rows starting with "abc" with zero or multiple trailing spaces are returned.
BitsCN.com