1

I am after all cells containing the 'LINE SEPARATOR' (U+2028) unicode point. Normally this is encoded as \u+2028 or something similar. However googling how this translates to SQL has given various options none of which seem to work ((N'2028'), set @hexstring = '2028';, vchar(2028))

SELECT * FROM myTable WHERE desc LIKE '% [SOME WAY TO ESCAPE U+2028 ] %'
Community
  • 1
  • 1
Robert
  • 37,670
  • 37
  • 171
  • 213
  • 1
    http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-UESCAPE –  Jun 03 '15 at 12:32

2 Answers2

7

ANSI SQL answer, may or may not work with Postgresql.

SELECT * FROM myTable WHERE desc LIKE U&'%\2028%'
jarlh
  • 42,561
  • 8
  • 45
  • 63
1

Alternative solution using regexp:

select * from mytable where desc ~ '\x2028';
Radek Postołowicz
  • 4,506
  • 2
  • 30
  • 47