Re: [GENERAL] Setting variable

2007-06-19 Thread Aleksis Petrov
On 6/18/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: Hello, I need to know why can't I do it? 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 - interva

Re: [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Michael Glaesemann
On Jun 18, 2007, at 10:17 , Michael Glaesemann wrote: Looking over your function, I'm a little confused about what you're trying to do. I'm guessing the (final) result you're trying to get is the number of hours lost for each product per area per month for the three years prior to the prov

Re: [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Michael Glaesemann
On Jun 18, 2007, at 9:34 , Ranieri Mazili wrote: Hello, I'm trying do the following function: 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