pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jorge Godoy <jgodoy@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Returning String as Integer
Date: Fri, 5 May 2006 18:52:19 -0300
Message-ID: <200605051852.19596.jgodoy@gmail.com> (raw)
In-Reply-To: <18AE59788A3FC640A367E5652E664D8002093F0C@xmb-sjc-237.amer.cisco.com>
References: <18AE59788A3FC640A367E5652E664D8002093F0C@xmb-sjc-237.amer.cisco.com>

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@gmail.com>




view thread (10+ messages)  latest in thread

Message-ID: <200605051852.19596.jgodoy@gmail.com>
Permalink:  ../200605051852.19596.jgodoy@gmail.com/
Also on:    postgresql.org/message-id/200605051852.19596.jgodoy@gmail.com

 · 

reply

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: jgodoy@gmail.com
  Subject: Re: Returning String as Integer
  In-Reply-To: <200605051852.19596.jgodoy@gmail.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