what's going on...

From: "Lukasz Feldman" <lukasz(at)atm(dot)com(dot)pl>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: what's going on...
Date: 2001-12-05 13:48:15
Message-ID: 00b001c17d93$7d677040$6a09810a@atm.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello!

I was trying to create a function:

CREATE FUNCTION analizuj_pomiary() RETURNS bool AS '
DECLARE pomiary RECORD;
BEGIN
FOR pomiary IN SELECT * FROM brewan_pomiar LOOP

IF substr(pomiary.datetime,1,10)=to_char(now(),'mm/dd/yyyy')
THEN
INSERT INTO TESTOWA
VALUES (
analizuj_flow(
pomiary.ipRouter,
pomiary.source_ip,
pomiary.dest_ip,
pomiary.bytes,
pomiary.datetime)
);
END IF;

END LOOP;
RETURN true;
END; ' LANGUAGE 'plpgsql';

... and I received an error:

ERROR: parser: parse error at or near "mm"

What's going on? What does it mean?

-----
Łukasz Feldman, Konsultant
Zespol Konsultantow ds. Systemów Zarzadzania Sieciami i Systemami
Telekomunikacyjnymi;
ATM S.A., ul. Grochowska 21a, 04-186 Warszawa, POLAND
tel (+48 22) 5156332, fax (+48 22) 5156146, mobile (+48) 607 167 634 ,
http://www.atm.com.pl

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jason Earl 2001-12-05 16:04:10 Re: what's going on...
Previous Message Michael Klatt 2001-12-04 20:15:08 Number of days in a month