2red13
2red13

Reputation: 11227

sqlite android replace char

i want so replace a char(160) with char (20) in a ORDER BY statement, but

ORDER BY REPLACE(column,CHAR(160),CHAR(20)) 

Throws an Exeption because CHAR() ist unknown. How can i cast a ascii code in SQLITE?

Upvotes: 0

Views: 186

Answers (1)

biegleux
biegleux

Reputation: 13247

ORDER BY REPLACE(column, CAST(X'A0' AS TEXT), CAST(X'14' AS TEXT))

A0 and 14 are in hexadecimal format

Upvotes: 1

Related Questions