Skip to Main Content

APEX

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!

Stacked bar/null data bug.

Padmocho-OracleNov 24 2006 — edited Jul 5 2007
Hi All,
Despite a number of posts reporting this bug in previous releases of Apex I am facing a simmilar issue as people before me...

I am trying to generate a stacked bar graph for a given period of time. To make my point clear let me provide an example:

1. I have a "project" table with info such as project_due_date and project_complete_date....
2. Now lets say I have 2 projects which were completed in JAN, and 3 projects which were completed in MAR (no projects were done in FEB)
3. Now the following SQL:

SELECT null LINK,
to_char(project_due_date,'MONTH') Month,
count(*) Late
FROM dm_project

-- Check for projects within due date (SLA)
WHERE project_complete_date < project_due_date

-- Group them by every month
GROUP BY to_char(project_due_date,'MONTH')

Will give me something like:

LINK MONTH LATE
- JANUARY 2
- MARCH 3

This will generate a graph which will display the number of projects that where completed within given time (< project_due_date).
BUT !
The above will only show 2 bars with January and March as X-Axis Labels... Obviously this is not a very representative way of displaying data.

Now, as a workaround I would like to build my queary so that it would return something like:
LINK MONTH LATE
- JANUARY 2
- FEBRUARY 0
- MARCH 3
- APRIL 0
-...etc...
- DECEMBER 0

So my question is finally this:
Is there anyway to get the months of the given year in SQL which I could use as my label value of the graph?

Kind regards,
Pawel.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2007
Added on Nov 24 2006
45 comments
1,806 views