Re: Returning String as Integer

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Returning String as Integer
Date: 2006-05-05 21:52:19
Message-ID: 200605051852.19596.jgodoy@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Em Sexta 05 Maio 2006 18:37, Kashmira Patel (kupatel) escreveu:
> 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?

testing=# select '123'::integer;
int4
------
123
(1 registro)

testing=#

--
Jorge Godoy <jgodoy(at)gmail(dot)com>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Hogan, James F. Jr. 2006-05-05 21:58:03 Re: Returning String as Integer
Previous Message elein 2006-05-05 21:51:49 Re: Returning String as Integer