Re: Returning String as Integer

From: elein <elein(at)varlena(dot)com>
To: "Kashmira Patel (kupatel)" <kupatel(at)cisco(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Returning String as Integer
Date: 2006-05-05 21:51:49
Message-ID: 20060505215149.GC18214@varlena.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)varlena(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jorge Godoy 2006-05-05 21:52:19 Re: Returning String as Integer
Previous Message Kashmira Patel (kupatel) 2006-05-05 21:37:13 Returning String as Integer