Re: Converting VARCHAR to DECIMAL or NUMERIC

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Converting VARCHAR to DECIMAL or NUMERIC
Дата
Msg-id 20030825225737.L16064-100000@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Converting VARCHAR to DECIMAL or NUMERIC  (Juan Francisco Diaz <j-diaz@publicar.com>)
Список pgsql-novice
On Mon, 25 Aug 2003, Juan Francisco Diaz wrote:

> The subject says it all... How can that be done? I tried to do an explicit
> cast but... Id dint work.

I think currently you'll need to convert to text first, so something like:
cast(cast(varcharcol as text) as numeric) because there's no
varchar->numeric direct cast (although I'm not sure if an explicit cast
would be bad for those cases that text has currently that varchar doesn't)



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: INSERT INTO foo (col1,col2,...,coln) not working
Следующее
От: Juan Francisco Diaz
Дата:
Сообщение: How come PGsql function can only handle 3 params?