Re: parsing column info

Поиск
Список
Период
Сортировка
От Jeff Eckermann
Тема Re: parsing column info
Дата
Msg-id 20020910215530.12437.qmail@web20805.mail.yahoo.com
обсуждение исходный текст
Ответ на parsing column info  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Список pgsql-general
--- "Johnson, Shaunn" <SJohnson6@bcbsm.com> wrote:
> I no longer want the decimals in that column.  Is
> there
> a way to parse out the decimals when copying this
> into
> a new table?

Assuming that this column is a varchar(50) like the
others, and that all you want is to delete the decimal
points, probably the easiest way is to use the
"translate" builtin function:
SELECT translate(field,'.', '') (I think: check the
syntax under "string functions" in the docs).

__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

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

Предыдущее
От: snpe
Дата:
Сообщение: Re: describe table query?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Psql regex is NFA or DFA?