Re: even after laboriously following previous post, cannot cast from char to int
В списке pgsql-novice по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: even after laboriously following previous post, cannot cast from char to int |
| Дата | |
| Msg-id | 13467.1297971129@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | even after laboriously following previous post, cannot cast from char to int (Lille Penguini <lille.penguini@gmail.com>) |
| Список | pgsql-novice |
Lille Penguini <lille.penguini@gmail.com> writes: > Re casting char columns to int, I've worked all the proposed solutions > from previous > post-gres mailing list > posts<http://archives.postgresql.org/pgsql-general/2010-02/msg01078.php>, > but to no avail. > None of the ALTER TABLE proposed fixes worked for me, and now I have a new > INTEGER type column created, I execute the following: > UPDATE zip_code_data SET county_fips_rev = CAST(county_fips as INTEGER); > ...and this is what I get: > ERROR: invalid input syntax for type numeric: " " > What is this telling me? It's telling you you have a row in which the value is all blanks, and that doesn't look enough like a number to satisfy the cast function. You need to clean the data ... regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера