Re: [sqlite] Function hex

2008-02-14 Thread Ken
The output of the native sqlite function "hex" is not really a hex value of a number. Its a hex representation of a string. select 5629701397680549, hex(5629701397680549) ; 5629701397680549|35363239373031333937363830353439 Where to_hex outputs: select 5629701397680549, to_hex(562970

Re: [sqlite] Function hex

2008-02-14 Thread Mau Liste
Ken wrote: > Try using the attached hex.c function. You'll need to compile this as a .so > and call sqlite3_create_function to register it. > > Hth Thanks Ken. This is exactly what I need. Regards to all. Mau. ___ sqlite-users mailing list

Re: [sqlite] Function hex

2008-02-14 Thread Mau Liste
...ooops! I am "using" 3.5.5, but I was experimenting with an older SqliteSpy that was statically linked with 3.3.(something less than 13) Additionally I found that the function hex is not exactly what I want ... I need hex(128) -> 0x80 instead I have 313238 that is the conversion of the byte

Re: [sqlite] Function hex

2008-02-14 Thread Ken
Try using the attached hex.c function. You'll need to compile this as a .so and call sqlite3_create_function to register it. Hth Mau Liste <[EMAIL PROTECTED]> wrote: Hello all, I am trying to print some table values in hexadecimal. I've seen in the docs that there is a function called 'hex' but

Re: [sqlite] Function hex

2008-02-14 Thread drh
Mau Liste <[EMAIL PROTECTED]> wrote: > > results in: SQL error: no such function: hex > Added by version 3.3.13, one year ago yesterday. http://www.sqlite.org/releaselog/3_3_13.html What version are you running? -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Function hex

2008-02-14 Thread Mau Liste
Hello all, I am trying to print some table values in hexadecimal. I've seen in the docs that there is a function called 'hex' but the following: create table aa (a integer); insert into aa values(10); insert into aa values(11); insert into aa values(12); insert into aa values(13); insert into aa