On Fri, 14 Nov 2014 04:59:58 -0700 (MST), bjdodo <bjd...@hotmail.com>
wrote:

>Hi
>
>Sorry for resurrecting an old thread. I got the where clause working for
>queries with byte array arguments based on this discussion. I cannot find
>the way to use byte arrays in where clauses for update and delete
>statements. I know it is terrible to use byte arrays as query arguments, I
>need this because of some 3rd party library problems. I also know that I can
>query for the row and do the update using some other column in the where
>clause I just find that "hacky". So if there is a way to do this trick for
>deletes and updates please let me know.


$ sqlite3 test.sqlite
SQLite version 3.8.8 2014-11-13 14:30:56
Enter ".help" for usage hints.
sqlite> CREATE TABLE t (id INTEGER PRIMARY KEY NOT NULL, bl BLOB);
sqlite> INSERT INTO T VALUES (1,x'313131');
sqlite> INSERT INTO T VALUES (2,x'323232');
sqlite> UPDATE T SET bl=x'333333' WHERE bl=x'323232';
sqlite> SELECT * FROM t;
1|111
2|333
sqlite> DELETE FROM t WHERE bl=x'313131';
sqlite> SELECT * FROM t;
2|333
sqlite>

>Thank you,
>Jozsef

Hope this helps.

-- 
Regards,
Kees Nuyt


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to