dbTalk Databases Forums  

from max date - 7 days

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss from max date - 7 days in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sansar
 
Posts: n/a

Default from max date - 7 days - 10-19-2007 , 04:39 AM






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.yyy y')) from
dba_tab_partitions
where table_name='FRONTEND_TAB'

thank you

Oracle info: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit
Production


Reply With Quote
  #2  
Old   
sansar
 
Posts: n/a

Default Re: from max date - 7 days - 10-19-2007 , 06:10 AM






On 19 Okt., 11:39, sansar <uemit.uen... (AT) googlemail (DOT) com> wrote:
Quote:
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.yyy y')) 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.yyy y')) - 7 from
dba_tab_partitions

where table_name='FRONTEND_TAB';



Reply With Quote
  #3  
Old   
William Robertson
 
Posts: n/a

Default Re: from max date - 7 days - 10-20-2007 , 03:17 AM



On Oct 19, 12:10 pm, sansar <uemit.uen... (AT) googlemail (DOT) com> wrote:
Quote:
On 19 Okt., 11:39, sansar <uemit.uen... (AT) googlemail (DOT) 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.yyy y')) 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.yyy y')) - 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.



Reply With Quote
  #4  
Old   
sansar
 
Posts: n/a

Default Re: from max date - 7 days - 10-20-2007 , 07:40 AM



On 20 Okt., 10:17, William Robertson <williamr2... (AT) googlemail (DOT) com>
wrote:
Quote:
On Oct 19, 12:10 pm, sansar <uemit.uen... (AT) googlemail (DOT) com> wrote:



On 19 Okt., 11:39, sansar <uemit.uen... (AT) googlemail (DOT) 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.yyy y')) 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.yyy y')) - 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.
the partition name is:
for example= "part_19.10.2007"
when i give "" to the partitio names, that makes don't problems.



Reply With Quote
  #5  
Old   
joel garry
 
Posts: n/a

Default Re: from max date - 7 days - 10-22-2007 , 03:32 PM



On Oct 20, 5:40 am, sansar <uemit.uen... (AT) googlemail (DOT) com> wrote:
Quote:
On 20 Okt., 10:17, William Robertson <williamr2... (AT) googlemail (DOT) com
wrote:





On Oct 19, 12:10 pm, sansar <uemit.uen... (AT) googlemail (DOT) com> wrote:

On 19 Okt., 11:39, sansar <uemit.uen... (AT) googlemail (DOT) 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.yyy y')) 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.yyy y')) - 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.

the partition name is:
for example= "part_19.10.2007"
when i give "" to the partitio names, that makes don't problems
Could it be that putting the dot in makes it look for a schema named
part_19? And putting the quotes on protects the partition name from
schema translation? Or something like that.

jg
--
@home.com is bogus.
Ad on dizwell blog post about shutting down:
http://h71028.www7.hp.com/enterprise...erproof/google




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.