Clay Baenziger <[EMAIL PROTECTED]> wrote:
> Let's try a small number:
> sqlite> SELECT HEX(minMAC) FROM manifests WHERE minMAC <= X'04';
> 00C100000000
> [Wrong -- x'04' < x'00C100000000']

Blobs are not compared as if they are very large integers, but rather 
lexicographically, byte by byte (the way memcmp would). Under such a 
comparison, x'04' is greater than x'00C100000000' - for the same reason 
that 'z' is greater than 'abcd'.

> Let's try another small number:
> sqlite> SELECT HEX(minMAC) FROM manifests WHERE minMAC <= X'04421';
> SQL error: unrecognized token: "X'04421'"
> [What's malformed about this compared to above?]

A hex literal has to contain an even number of hex digits.

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to