to_hex leading zeroes

Started by Pedro Doria Meunierabout 17 years ago2 messagesgeneral
Jump to latest
#1Pedro Doria Meunier
pdoria@netmadeira.com

Hi All,

I'm in a bit of a pickle here with the to_hex function not returning leading
zeroes ...
For instance if I:
SELECT to_hex(10);

it returns 'a' not '0a' .

Any ideas on how to overcome this?

TIA,

Pedro Doria Meunier
GSM: +351961720188
Skype: pdoriam

#2Scott Marlowe
scott.marlowe@gmail.com
In reply to: Pedro Doria Meunier (#1)
Re: to_hex leading zeroes

On Sun, Mar 15, 2009 at 6:47 AM, Pedro Doria Meunier
<pdoria@netmadeira.com> wrote:

Hi All,

I'm in a bit of a pickle here with the to_hex function not returning leading
zeroes ...
For instance if I:
SELECT to_hex(10);

it returns 'a' not '0a' .

Have you looked at lpad()?