Re: CAST(integer_field AS character) truncates trailing zeros

From: "Douglas McNaught" <doug(at)mcnaught(dot)org>
To: "Warren Bell" <warren(at)clarksnutrition(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CAST(integer_field AS character) truncates trailing zeros
Date: 2008-07-31 20:16:33
Message-ID: 5ded07e00807311316n5e8753ap7bdc44e5f965b02a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 31, 2008 at 4:03 PM, Warren Bell <warren(at)clarksnutrition(dot)com> wrote:
> 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?

Please supply the exact syntax that you're using to do the cast.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma 2008-07-31 20:17:24 Re: CAST(integer_field AS character) truncates trailing zeros
Previous Message Warren Bell 2008-07-31 20:03:01 CAST(integer_field AS character) truncates trailing zeros