Home » SQL & PL/SQL » SQL & PL/SQL » In Oracle Report I need to Get the Date (Microsoft XP)
In Oracle Report I need to Get the Date [message #324039] Fri, 30 May 2008 06:24 Go to next message
cvs_1984
Messages: 136
Registered: August 2007
Location: Punjab, INDIA
Senior Member

Hai Everybody,


During the Report Creation.

I Got the Report Priviledge of From Date and TO Date.

During the Report Run I need to Got the Dates Between the From Date and To Date.


If From Date = 01-May-2008 TO_Date = 07-May-2008

Needed Output of:

01-May-2008
02-May-2008
03-May-2008
04-May-2008
05-May-2008
06-May-2008
07-May-2008

Pls help me to got this type of Output.
Re: In Oracle Report I need to Get the Date [message #324042 is a reply to message #324039] Fri, 30 May 2008 06:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is asked every week, so please search BEFORE posting.
Search for "calendar" or "row generator"

Regards
Michel
Re: In Oracle Report I need to Get the Date [message #324070 is a reply to message #324039] Fri, 30 May 2008 10:19 Go to previous messageGo to next message
boukerker
Messages: 11
Registered: January 2008
Location: Paris
Junior Member
SELECT SYSDATE + (LEVEL - 1) FROM dual CONNECT BY LEVEL<= trunc( ( SYSDATE + 5 ) - SYSDATE );

Regards.
Re: In Oracle Report I need to Get the Date [message #324071 is a reply to message #324070] Fri, 30 May 2008 10:44 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
@boukerker

Please read and follow OraFAQ Forum Guide, especially:


  • "How to format your post?" section.
    Make sure that lines of code do not exceed 80 characters when you format.
    Indent the code (See SQL Formatter) and align the columns in result.
    Use the "Preview Message" button to verify.
  • "Responding to Posts" section:
    Quote:
    When responding to questions, if it is obviously a student with a homework assignment or someone else just learning, especially in the homework and newbies forums, it is usual to provide hints or clues, perhaps links to relevant portions of the documentation, or a similar example, to point them in the right direction so that they will research and experiment on their own and learn, and not provide complete solutions to problems. In cases where someone has a real-life complex work problem, or at least it may seem complex to them, it may be best to provide a complete demo and explanation.


In addition, I think "trunc( ( SYSDATE + 5 ) - SYSDATE )" is more simply 5 and your query does NOT answer OP question.

Regards
Michel
Re: In Oracle Report I need to Get the Date [message #324243 is a reply to message #324070] Sat, 31 May 2008 22:19 Go to previous message
cvs_1984
Messages: 136
Registered: August 2007
Location: Punjab, INDIA
Senior Member

Hello Mr. boukerker,

Thanks for your Reply. Its useful to me.
Previous Topic: using object tables
Next Topic: Partitioning & Truncating a Table based on date in Oracle 10 g
Goto Forum:
  


Current Time: Wed Dec 07 18:29:07 CST 2016

Total time taken to generate the page: 0.12681 seconds