Re: How do I change the default quaters in PL/SQL
From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Fri, 02 Jun 2006 22:32:46 +0200
Message-ID: <5081821pj7sb6qe4jqs7fesmdc8b2ih0sq_at_4ax.com>
Date: Fri, 02 Jun 2006 22:32:46 +0200
Message-ID: <5081821pj7sb6qe4jqs7fesmdc8b2ih0sq_at_4ax.com>
[Quoted] On Fri, 2 Jun 2006 12:35:26 -0400, "Mark C. Stock" <mcstockX_at_Xenquery .com> wrote:
>not a complete description, but it sounds like some sort of rounding to the
>next or previous monday based on the day of week the quarter starts/ends on
>
>so a combination of trunc, to_char, and next_day with a case or a decode
>should accomplish whatever the algorithm actually is ... which could then be
>encapsulated in a function
[Quoted] Actually if he gets the ISO week number (which follows his requirements) and DIVs that through 13 (each quarter is 13 weeks) he only needs to take the classic case of week 53 into account. Pipelined functions are irrelevant in this case.
-- Sybrand Bakker, Senior Oracle DBAReceived on Fri Jun 02 2006 - 22:32:46 CEST