I found that, but I need essentially the reverse of that.   The data stored
in SQL is 3061626364 and I need to convert it back to 0abcd (from your
example)

On Wed, Apr 18, 2012 at 5:35 PM, Roger Binns <rog...@rogerbinns.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 18/04/12 14:30, Jim Sanders wrote:
> > But I can't figure out a way do this dynamically for all rows.
>
> There is a builtin hex() function.
>
>  sqlite> create table foo(bar); insert into foo values('0abcd');
>  sqlite> select hex(bar) from foo;
>  3061626364
>
> This applies when databases are in the most likely utf8 encoding.  In
> utf16 encoding each character is two bytes(*).  'pragma encoding' will
> tell you which is in use.
>
> (*) Unicode is more complicated than that.
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iEYEARECAAYFAk+PM6AACgkQmOOfHg372QRv0wCghYRb3wBoTwKyMj6NTfuzFNw6
> +RYAn3gj8vo0PEFJph1wnMH0bPZwkKDr
> =mtot
> -----END PGP SIGNATURE-----
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to