Thanks everyone :)  

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jorge Godoy
Sent: Friday, May 05, 2006 2:52 PM
To: pgsql-sql@postgresql.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      <[EMAIL PROTECTED]>


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to