From: | "Kashmira Patel (kupatel)" <kupatel(at)cisco(dot)com> |
---|---|
To: | "Jorge Godoy" <jgodoy(at)gmail(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Returning String as Integer |
Date: | 2006-05-05 22:04:58 |
Message-ID: | 18AE59788A3FC640A367E5652E664D8002093F39@xmb-sjc-237.amer.cisco.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thanks everyone :)
-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Jorge Godoy
Sent: Friday, May 05, 2006 2:52 PM
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Returning String as Integer
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>
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
From | Date | Subject | |
---|---|---|---|
Next Message | Miroslav Šulc | 2006-05-06 08:13:08 | Most efficient way to hard-sort records |
Previous Message | Hogan, James F. Jr. | 2006-05-05 21:58:03 | Re: Returning String as Integer |