| От | Jean-Yves F. Barbier |
|---|---|
| Тема | Re: Invalid input syntax for integer |
| Дата | |
| Msg-id | 20110818174304.6b0cb977@anubis.defcon1 обсуждение исходный текст |
| Ответ на | Invalid input syntax for integer (Hans Edwin Winzeler <hewinzeler@gmail.com>) |
| Список | pgsql-novice |
On Thu, 18 Aug 2011 11:07:58 -0400, Hans Edwin Winzeler <hewinzeler@gmail.com>
wrote:
Oops, forgot this one:
> - How do I convert the varchar(20) that I have already imported into a
> numeric value?
you need to:
* add a real/float/numeric/... wanted column to the table,
* use a function that:
read a row,
get the varchar(20) column,
check for beginning with 0-[1-9],
strip '0-' from the string,
convert it into the wanted format,
update table's real/float/numeric/... column with the result,
loop until end of table.
--
Reality is for people who can't deal with drugs.
-- Lily Tomlin
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера