> -Ursprungligt meddelande-
> Från: Janning Vygen [mailto:[EMAIL PROTECTED]
> Skickat: den 7 november 2005 15:18
> Till: pgsql-sql@postgresql.org
> Kopia: Robert Blixt
> Ämne: Re: [SQL] Extract week from date, start with sunday
>
> Am Montag, 7. November 2005 14
Hi,
I am currently extracting my weeks from a date like this..
SELECT INTO extractweek EXTRACT( week FROM ldate );
This works fine, except that this assumes (according
to ISO standard) that weeks starts with Monday.
I need the weeks to start with Sunday instead, otherwise
I will not get the
Hello,
I am trying to create a function that will allow
me to dynamically choose the ORDER BY sequence.
I also want the result of the SELECT statement to
be returned. Far as I can tell this can not be done
with EXECUTE alone rather I should use FOR .. IN EXECUTE.
The result of the statement is