Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Thu, 31 Jul 2008 13:03:01 -0700
  • Message-id: <48921A75.4090608@clarksnutrition.com> <text/plain>

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




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group