Re: [sqlite] BLOB concatenation?

2012-01-20 Thread Pavel Ivanov
>  > SELECT quote(cast(X'5445' || X'5354' as blob)); > >        Indeed, it seems to work.  Thanks! But beware that it's not guaranteed to work if blobs have embedded '\0' character (as it's actually not guaranteed to work if blobs don't have a valid UTF-8/UTF-16 text). Although I believe it works

Re: [sqlite] BLOB concatenation?

2012-01-20 Thread Ivan Shmakov
> Pavel Ivanov writes: [...] >> Unfortunately, the string concatenation operator, when applied to >> two BLOB's, results in a text string instead of a BLOB, like: >> SELECT quote (X'5445' || X'5354'); => 'TEST' > Maybe the following? > SELECT quote(cast(X'5445' || X'5354' as blob));

Re: [sqlite] BLOB concatenation?

2012-01-20 Thread Pavel Ivanov
>        Unfortunately, the string concatenation operator, when applied >        to two BLOB's, results in a text string instead of a BLOB, like: > > SELECT quote (X'5445' || X'5354'); >  => 'TEST' Maybe the following? SELECT quote(cast(X'5445' || X'5354' as blob)); Pavel On Fri, Jan 20, 2012

[sqlite] BLOB concatenation?

2012-01-20 Thread Ivan Shmakov
With substr (), it's possible to split a BLOB, like: SELECT quote (substr (X'1337cafe', 3, 2)); => X'CAFE' However, how do I concatenate two blobs? Unfortunately, the string concatenation operator, when applied to two BLOB's, results in a text string instead of