Hi Andreas,
if it is possible, can you tell me what error I 've put in my first
function?
Thanks,
Mo
Hello group,
I've got a new problem where I hope someone can give me a solution.
I have witten a function which should give back a type created by me. To get
the data into the type, I have to go through a loop, which holds other
loops.
Simplified (not really), it looks like this:
CREATE OR REPL
Original Message From: Moritz Bayer
>But still the question:
>Is it possible to put a loop into a loop? Or doesn't it make sense at all?
I'm not sure what the OP was about, but Yes, it it possible to put a loop into
a loop. See:
http://www.postgresql.org/docs/8.2/static/plpgsql-control
am Mon, dem 22.01.2007, um 15:58:32 +0100 mailte Moritz Bayer folgendes:
>
> But still the question:
> Is it possible to put a loop into a loop? Or doesn't it make sense at all?
Yes, is possible, why not? And sometimes it make sense...
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/
OK, this looks better:
CREATE OR REPLACE FUNCTION getregistrationtagging()
RETURNS SETOF ty_usertracking AS
$BODY$
DECLARE objReturn ty_usertracking%rowtype;
BEGIN
for objReturn IN
SELECT date_part('day',trackdate) as ty_day,
date_part('month',trackdate) as ty_month