Re: Setting variable

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Setting variable
Дата
Msg-id 0AF9CCEA-787E-42F3-8EFB-3CCF684A3D70@seespotcode.net
обсуждение исходный текст
Ответ на Setting variable  (Ranieri Mazili <ranieri.oliveira@terra.com.br>)
Список pgsql-sql
On Jun 18, 2007, at 9:29 , Ranieri Mazili wrote:

> CREATE OR REPLACE FUNCTION lost_hours_temp(date)
> RETURNS text AS
> $BODY$
> DECLARE
>    START_DATE date;
>    END_DATE date;
>    QUERY text;
> BEGIN
>    START_DATE := $1;
>    END_DATE := START_DATE - interval '3 year';
>
> The last line (END_DATE := START_DATE - interval '3 year';)
> generate the following error:
>
> ERROR: operator is not unique: "unknown" / "unknown"
> SQL state: 42725
> Hint: Could not choose a best candidate operator. You may need to
> add explicit type casts.
> Context: PL/pgSQL function "lost_hours_temp" line 10 at assignment

Note that the error is at line 10. You've only shown lines 1 through
7 of the function body, so you haven't actually shown us where the
error is.

Michael Glaesemann
grzm seespotcode net



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

Предыдущее
От: Ranieri Mazili
Дата:
Сообщение: Setting Variable - (Correct)
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: [GENERAL] Setting Variable - (Correct)