Cast Type

Поиск
Список
Период
Сортировка
От Thirumoorthy Bhuvneswari
Тема Cast Type
Дата
Msg-id 20020827091029.94869.qmail@web13603.mail.yahoo.com
обсуждение исходный текст
Список pgsql-general
hi,
I am using Postgresql-7.1 on RedHat Linux-7.1. I would
like to know about cast types. I am having a tableA
with two fields cr_amt varchar(15) and dr_amt
varchar(15). I am having about 10000 records so I
could not recreate it. I am having tableB with cr_amt
float8 and dr_amt float8. I want to use 'sum' function
from the tableB.I gave the query as the follows:
'insert into tableB select
(cr_amt::float8),(dr_amt::float8) from tableA;'
It comes with the error,
'Cannot cast type 'varchar' to 'float8'. How could I
achieve this. Please help me. thanks.

regards,
T.Bhuvaneswari.

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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

Предыдущее
От: "Ben-Nes Michael"
Дата:
Сообщение: how to count string occurrence in column
Следующее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: how to count string occurrence in column