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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How can I get the DD,MM, YYYY part of the every day in a duration of 10 years

RE: How can I get the DD,MM, YYYY part of the every day in a duration of 10 years

From: <sanjay.khangarot_at_wipro.com>
Date: Tue, 1 Feb 2005 20:04:45 +0530
Message-ID: <C1F81E780BC53D44A7C55DC6633F8414289644@blr-ec-msg05.wipro.com>


Thanks Stephane / Zorac

I am able to run the query, and can retrieve the individual component of the date: SELECT rownum ,to_char( ret_date,'DD') day,to_char( ret_date,'MM') month,to_char( ret_date,'YYYY') year, ret_date FROM (select (to_date('31/12/1998','DD MM YYYY') + rownum) ret_date from dba_objects,dba_objects where rownum < (TO_DATE('01/01/2010','DD/MM/YYYY') - TO_DATE('01/01/1999','DD/MM/YYYY')) )

|Thanks all

Regards

Sanjay


From: Stephane Faroult [mailto:sfaroult_at_roughsea.com] Sent: Tue 2/1/2005 5:17 PM
To: oracle-l_at_freelists.org; Sanjay Khangarot (WT01 - MANUFACTURING) Subject: Re: How can I get the DD,MM, YYYY part of the every day in a duration of 10 years

10 years = about 3600 rows

I suppose that T is a 4000+ row table

select to_char(to_date('01/01/1999', 'DD/MM/YYYY') + rownum - 1, 'MM DD YYYY') from T
where rownum < to_date('01/01/2010', 'DD/MM/YYYY') - to_date('01/01/1999', 'DD/MM/YYYY')

Regards,

Stephane Faroult

RoughSea Ltd

http://www.roughsea.com

On Tue, 1 Feb 2005 16:01 , <sanjay.khangarot_at_wipro.com> sent:

	Hi,
	I want to generate one script which can return me dd,mm , yyyy part of every day for a duration, for example ..
	if I start from Jan 01,1999 to jan 01, 2010 then wanted the record for every day..
	01 01 1999
	02 01 1999
	....

	till
	01 01 2010..

	this will be used to create one time dimension..

	TIA

	Regards

	Sanjay





	Confidentiality Notice

	The information contained in this electronic message and any attachments to this message are intended
	for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
	you are not the intended recipient, please notify the sender at Wipro or Mailadmin_at_wipro.com immediately
	and destroy all copies of this message and any attachments.
	--
	http://www.freelists.org/webpage/oracle-l







Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin_at_wipro.com immediately and destroy all copies of this message and any attachments.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 01 2005 - 09:42:08 CST

Original text of this message

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