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
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 - interval '3 year';
The last line (END_DATE := START_DATE - interval
On Jun 18, 2007, at 12:11 , Ranieri Mazili wrote:
Look, I did a UNION, exist other way to do it better?
Considering your aggregates are different, you shouldn't really union
them. In the upper query of the union, you've got production_period
(which is actually a date that represents the b
Original Message
Subject: Re:[SQL] [GENERAL] Setting Variable - (Correct)
From: Michael Glaesemann <[EMAIL PROTECTED]>
To: Ranieri Mazili <[EMAIL PROTECTED]>
Date: 18/6/2007 13:50
[Please reply to the list so that others may benefit from and
participate in th
[Please reply to the list so that others may benefit from and
participate in the discussion.]
On Jun 18, 2007, at 11:32 , Ranieri Mazili wrote:
Thanks a lot for your prompt reply.
You query is perfect for my problem, but I need another thing with
it, I need to return the sum of production_h
Original Message
Subject: Re:[SQL] [GENERAL] Setting Variable - (Correct)
From: Michael Glaesemann <[EMAIL PROTECTED]>
To: Michael Glaesemann <[EMAIL PROTECTED]>
Date: 18/6/2007 13:15
On Jun 18, 2007, at 10:17 , Michael Glaesemann wrote:
Looking over your fun
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
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
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 year';
WHILE EXTRACT(YEAR FROM START_DATE) = E
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 - interval '3 year';
The last line (END_DATE := START_DATE - interval
10 matches
Mail list logo