Home » SQL & PL/SQL » SQL & PL/SQL » how to print output of all days of a month using sql
icon3.gif  how to print output of all days of a month using sql [message #210320] Wed, 20 December 2006 06:27 Go to next message
shailesh.jain14
Messages: 6
Registered: December 2006
Location: pune
Junior Member
if month & year are jan 2006
then print
1/1/2006
2/1/2006
3/1/2006
-
-
-
-
-
-
-
-
-
-
-
31/1/2006
from sql query
Re: how to print output of all days of a month using sql [message #210324 is a reply to message #210320] Wed, 20 December 2006 06:41 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You need some sort of row generator:
SELECT *
FROM (SELECT sysdate +level  
      FROM   dual
      CONNECT BY level <=(add_months(sysdate,1)-sysdate))
Re: how to print output of all days of a month using sql [message #210330 is a reply to message #210324] Wed, 20 December 2006 06:58 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Have a look here.

This one's closed.

http://www.orafaq.com/forum/fa/448/0/

MHE
Previous Topic: Dispaly all Dates of Month
Next Topic: SQL Oddity
Goto Forum:
  


Current Time: Sat Dec 10 12:55:04 CST 2016

Total time taken to generate the page: 0.08348 seconds