Re: Function to convert numeric string to number in version 8.0

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Function to convert numeric string to number in version 8.0
Дата
Msg-id 20060309223504.GB21716@wolff.to
обсуждение исходный текст
Ответ на Function to convert numeric string to number in version 8.0  (David Gaudine <davidg@alcor.concordia.ca>)
Список pgsql-novice
On Thu, Mar 09, 2006 at 16:13:47 -0500,
  David Gaudine <davidg@alcor.concordia.ca> wrote:
> Is there a function that will convert a numeric string to a number,
> returning zero if the string is empty?

You can use to_number to convert a string to a number. You can combine
that with a case statement to only convert strings that look like a number
and return zero for strings that don't look like a number.

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

Предыдущее
От: David Gaudine
Дата:
Сообщение: Function to convert numeric string to number in version 8.0
Следующее
От: 王宝兵
Дата:
Сообщение: Re: Where Can I Find The Code Segment For WAL Control?