On Wed, 18 Dec 2002 14:03:27 +0100
Conxita Marín <comarin(at)telefonica(dot)net> wrote:
> I try to do something like this:
>
> CREATE FUNCTION prova() RETURNS numeric(20,0) AS
> '
> DECLARE
> aux TIMESTAMP;
> aux2 numeric(20,0);
> BEGIN
> aux = ''01.01.2002 00:00:00 CET'';
> aux2 = SELECT EXTRACT(EPOCH FROM TIMESTAMP aux);
Instead of this line, I think you need to execute the following statement:
SELECT INTO aux2 EXTRACT(EPOCH FROM aux);
Regards,
Masaru Sugawara