Thread: ...
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 get
the error "type of <a> does not match target column <b>". Is there a convert function available? Sure would appriciate some help, besides spelling..
Thanks
Doug
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..ThanksDougprova=> 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 -