Skip to main content
1 of 4
Martin Smith
  • 86.5k
  • 15
  • 252
  • 342

Ranges in the pattern syntax use the sorting rules of your collation.

Use a binary collate clause so the range is ordered by character code.

(I also changed it to LIKE as I find that more obvious than PATINDEX > 0)

SELECT *      
FROM mbrnotes      
WHERE LINE_TEXT LIKE '%[' + CHAR(127)+ '-' +CHAR(255)+']%'  COLLATE Latin1_General_100_BIN2
Martin Smith
  • 86.5k
  • 15
  • 252
  • 342