Re: Cast char to number

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: Cast char to number
Дата
Msg-id 20100224143847.604d7ef2.wmoran@potentialtech.com
обсуждение исходный текст
Ответ на Cast char to number  (Christine Penner <christine@ingenioussoftware.com>)
Ответы Re: Cast char to number  (Christine Penner <christine@ingenioussoftware.com>)
Список pgsql-general
In response to Christine Penner <christine@ingenioussoftware.com>:

> I have a character field I want to change to a number. The values in
> that field are all numbers that may or may not be padded with spaces
> or 0's. What is the best way to do that?

Put the values in numeric fields to begin with and cast to chars as
needed.  Basically reverse what you're doing.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

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

Предыдущее
От: Christine Penner
Дата:
Сообщение: Cast char to number
Следующее
От: Christine Penner
Дата:
Сообщение: Re: Cast char to number