Re: [GENERAL] check data for datatype

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: [GENERAL] check data for datatype
Дата
Msg-id 55159E1A.3050608@iol.ie
обсуждение исходный текст
Ответ на check data for datatype  (Suresh Raja <suresh.rajaabc@gmail.com>)
Список pgsql-sql
On 27/03/2015 18:08, Suresh Raja wrote:
>     Hi All:
>
>
> I have a very large table and the column type is text.  I would like to
> convert in numeric.  How can I find rows that dont have numbers.  I
> would like to delete those rows.

Use a regular expression:

  select <whatever> from <the table> where <the column> ~ <regexp>

http://www.postgresql.org/docs/9.4/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP

HTH,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


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

Предыдущее
От: Suresh Raja
Дата:
Сообщение: check data for datatype
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: [GENERAL] check data for datatype