| От | Tom Lane |
|---|---|
| Тема | Re: issue with an assembled date field |
| Дата | |
| Msg-id | 10264.1204310860@sss.pgh.pa.us обсуждение |
| Ответ на | issue with an assembled date field (Chris Bowlby <excalibur@accesswave.ca>) |
| Ответы |
Re: issue with an assembled date field
|
| Список | pgsql-general |
Chris Bowlby <excalibur@accesswave.ca> writes:
> I am converting an encoded field (lot_id) into a date field, the 5
> character of every lot_id is always the year and as such I need to
> extract the year using the following function:
> substring(ilch.lot_id::text, 5, 1)
Well, I'd say that the failure proves that some of your data does
*not* have the year in the fifth character.
> ERROR: invalid input syntax for type date: "01/01/0W"
Time for some data sanitizing?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера