Re:

From: "jose' soares" <sferac(at)bo(dot)nettuno(dot)it>
To: Doug Smith <doug(at)the-bridge(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 1999-02-15 12:14:08
Message-ID: 36C80F90.643B39E0@bo.nettuno.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Doug Smith ha scritto:

> I have a field that is presently an int4 and I would like to change
> it and it's contents to a float. I tried building a new table and
> insert the data into the new field but I getthe error "type of <a>
> does not match target column <b>". Is there a convert function
> available? Sure would appriciate some help, besides
> spelling..ThanksDoug

prova=> create table test(i int4);
CREATE
prova=> insert into test values (1);
INSERT 188494 1
prova=> create table test1 ( f float);
CREATE
prova=> insert into test1 select float8(i) from test;
INSERT 188504 1
prova=> select * from test1;
f
-
1
(1 row)

--
- Jose' -

And behold, I tell you these things that ye may learn wisdom; that ye
may
learn that when ye are in the service of your fellow beings ye are only
in the service of your God. - Mosiah 2:17 -

In response to

  • at 1999-02-13 19:24:38 from Doug Smith

Browse pgsql-general by date

  From Date Subject
Next Message Ingrith Andrea Correa Vargas 1999-02-15 15:00:07 Encapsulation
Previous Message Remigiusz Sokolowski 1999-02-15 09:54:47 Re: [GENERAL] A book for PgSQL? A need? yes? no?