plpgsql related question: intervals and variables
От | Wilhelm Graiss |
---|---|
Тема | plpgsql related question: intervals and variables |
Дата | |
Msg-id | 40925A3BA1EBD711A35C000102B6E57D06C9A7@BAL_PROXY00 обсуждение исходный текст |
Ответы |
Re: plpgsql related question: intervals and variables
Re: plpgsql related question: intervals and variables |
Список | pgsql-sql |
Hello out there, We have a problem in plpgsql: We want to add variable periods (result of a query) to a timestamp. Our Code looks like this: Begin heute := ''today''; Select Into vk ourcolumn From table where other = foo; If vk > 0 Thenvk_txt := ''Vorkuehlung notwendig''; ez :=heute + interval ''vk days''; Else vk_txt := ''Keine Vorkuehlung vorgeschrieben''; End if; We get the following: ERROR: Bad interval external representation 'vk days' The variable 'heute' is declared as timestamp, 'vk' as integer! What have we done wrong?? :( Thanks in advance, Willi, Albin -- ============================= Wilhelm Graiss Altirdning 12 8952 Irdning 03682/22451/267
В списке pgsql-sql по дате отправления: