Re:

Поиск
Список
Период
Сортировка
От jose' soares
Тема Re:
Дата
Msg-id 36C80F90.643B39E0@bo.nettuno.it
обсуждение исходный текст
Ответ на ...  ("Doug Smith" <doug@the-bridge.net>)
Список 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 -
 

В списке pgsql-general по дате отправления:

Предыдущее
От: Remigiusz Sokolowski
Дата:
Сообщение: Re: [GENERAL] A book for PgSQL? A need? yes? no?
Следующее
От: Ingrith Andrea Correa Vargas
Дата:
Сообщение: Encapsulation