Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to list dates by days between two dates

mgaldamesJul 2 2014 — edited Jul 2 2014

Hello there!

I need your experience to help me with a problem i have working with dates in Oracle 11gR2

If i use a table like:

DATEVALUE
2014/06/07100
2014/06/0923
2014/06/1432
2014/06/1543
2014/06/1754

i need a query to list all days and values between to dates (i.e. days between 2014/06/01 and 2014/06/20) and if a day is not registered it should be listed with value 0... the result should be the next:

DATEVALUE
2014/06/010
2014/06/020
2014/06/030
2014/06/040
2014/06/050
2014/06/060
2014/06/07100
2014/06/080
2014/06/0923
2014/06/100
2014/06/110
2014/06/120
2014/06/130
2014/06/1432
2014/06/1543
2014/06/160
2014/06/1754
2014/06/180
2014/06/190
2014/06/200

Is possible to do something like that in a query in Oracle 11gR2?

Thanx in advance for any help that u can give me.

best regards

Mauro!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2014
Added on Jul 2 2014
5 comments
4,333 views