From: elein <elein@varlena.com>
To: Kashmira Patel (kupatel) <kupatel@cisco.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Returning String as Integer
Date: Fri, 5 May 2006 14:51:49 -0700
Message-ID: <20060505215149.GC18214@varlena.com> (raw)
In-Reply-To: <18AE59788A3FC640A367E5652E664D8002093F0C@xmb-sjc-237.amer.cisco.com>
References: <18AE59788A3FC640A367E5652E664D8002093F0C@xmb-sjc-237.amer.cisco.com>
Use the to_number() function to convert text to numbers.
In the manual under functions and operators. The other
function like it is to_date().
--elein
elein@varlena.com
On Fri, May 05, 2006 at 02:37:13PM -0700, Kashmira Patel (kupatel) wrote:
> Hi all,
> I have a table with a column of type 'text'. It mainly contains numbers. Is
> there any way to select a value from this column and return it as an integer?
>
> Thanks,
> Kashmira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: elein@varlena.com, kupatel@cisco.com
Subject: Re: Returning String as Integer
In-Reply-To: <20060505215149.GC18214@varlena.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox