--- On Thu, 7/31/08, Warren Bell <[EMAIL PROTECTED]> wrote:

> From: Warren Bell <[EMAIL PROTECTED]>
> Subject: [GENERAL] CAST(integer_field AS character) truncates trailing zeros
> To: pgsql-general@postgresql.org
> Date: Thursday, July 31, 2008, 8:03 PM
> I am trying to cast an int to a character. The int is the
> number 1000 it 
> gets cast down to "1" and not "1000".
> How do I cast from int to 
> character without loosing the trailing zeros?
> 
> -- 
> Thanks,
> 
> Warren Bell
> 
> 
work to me

template1=# select cast('1000' as varchar);
 varchar
---------
 1000
(1 fila)

template1=#



> -- 
> Sent via pgsql-general mailing list
> (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


      


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to