Extract only numbers from a varchar column

Поиск
Список
Период
Сортировка
От Leandro Casadei
Тема Extract only numbers from a varchar column
Дата
Msg-id 5983afbb0805051008t2c714837y1052d11273b3529f@mail.gmail.com
обсуждение исходный текст
Список pgsql-general

I need to extract only the first occurence of numbers from a column  that is varchar.

Here are a few examples of what I need to do:

abc200xx -> 200
340ppsdd -> 340
150ytyty555 -> 150

Can this be done by a simple query or do I need to use a cursor?

Thanks

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

Предыдущее
От: "Leandro Casadei"
Дата:
Сообщение: Re: Extract only numbers from a varchar column
Следующее
От: Michael Enke
Дата:
Сообщение: CREATE CHARSET would be nice feature