SQL for monthly report with each month must be selected even if there is no data
manoj r patil
Joined: Jun 06, 2002
I have one requirement: I want to generate a monthly report for a period but the catch is that each month must be selected. So if the period is say 12 months, it must return 12 rows no matter whether data is there or not for those months.
I have given the sample which I am using currently but I need to mold it to satisfy the above requirement.
Any idea how can we write this SQL?
love your job and not your company;
...because you never know when your company will stop loving you!