IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to obtain list of all days in a month using DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pinomaiulis

New User


Joined: 08 May 2006
Posts: 6
Location: Italy

PostPosted: Wed Nov 22, 2006 4:51 pm
Reply with quote

Do any one have idea how to obtain list of all days in a month
using DB2 given functions?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Nov 22, 2006 4:58 pm
Reply with quote

Hi There,

Quote:
how to obtain list of all days in a month


What do u mean by that ?
Please provide example?
Back to top
View user's profile Send private message
pinomaiulis

New User


Joined: 08 May 2006
Posts: 6
Location: Italy

PostPosted: Wed Nov 22, 2006 5:03 pm
Reply with quote

guptae wrote:
Hi There,

Quote:
how to obtain list of all days in a month


What do u mean by that ?
Please provide example?


I would like to obtain all the days of a specific month by a single select.

example:

Select "list of the days"
from sysibm.sysdummy1
where month(current date) = 11
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Nov 22, 2006 5:09 pm
Reply with quote

Hi There,

What do u mean list of days?
Back to top
View user's profile Send private message
pinomaiulis

New User


Joined: 08 May 2006
Posts: 6
Location: Italy

PostPosted: Wed Nov 22, 2006 5:11 pm
Reply with quote

guptae wrote:
Hi There,

What do u mean list of days?


Query Result:

01.11.2006
02.11.2006
03.11.2006
04.11.2006
05.11.2006
06.11.2006
..
..
..
30.11.2006

Thank you
Back to top
View user's profile Send private message
Garpen

New User


Joined: 03 Jan 2007
Posts: 14
Location: Sweden

PostPosted: Mon Jan 08, 2007 5:23 pm
Reply with quote

Hi
I curious, how should the SQL look like ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts Build dataset list with properties us... PL/I & Assembler 4
Search our Forums:

Back to Top