Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: from max date - 7 days

Re: from max date - 7 days

From: William Robertson <williamr2019_at_googlemail.com>
Date: Sat, 20 Oct 2007 01:17:32 -0700
Message-ID: <1192868252.630503.162420@k35g2000prh.googlegroups.com>


On Oct 19, 12:10 pm, sansar <uemit.uen..._at_googlemail.com> wrote:
> On 19 Okt., 11:39, sansar <uemit.uen..._at_googlemail.com> wrote:
>
> > hallo !
> > can me somebody say, how i get from this select statement max date - 7
> > days.
>
> > select max(to_date(substr(PARTITION_NAME,6,10),'dd.mm.yyyy')) from
> > dba_tab_partitions
> > where table_name='FRONTEND_TAB'
>
> > thank you
>
> > Oracle info: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit
> > Production
>
> select max(to_date(substr(PARTITION_NAME,6,10),'dd.mm.yyyy')) - 7 from
> dba_tab_partitions
>
> where table_name='FRONTEND_TAB';

Can you give an example of some partition names? I'm surprised they have dots in them.

Can you be sure the names will always match the expected format? Looks a rather fragile approach to me. Received on Sat Oct 20 2007 - 03:17:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US