CAST(integer_field AS character) truncates trailing zeros

From: Warren Bell <warren(at)clarksnutrition(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: CAST(integer_field AS character) truncates trailing zeros
Date: 2008-07-31 20:03:01
Message-ID: 48921A75.4090608@clarksnutrition.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Douglas McNaught 2008-07-31 20:16:33 Re: CAST(integer_field AS character) truncates trailing zeros
Previous Message David R Robison 2008-07-31 19:43:58 Re: Doing an LDAP lookup from a SQL SELECT