This discussion is archived
4 Replies Latest reply: Jun 6, 2013 7:27 AM by guyenko RSS

Flash chart show incorrect data

guyenko Newbie
Currently Being Moderated
Hello,

The following query is used to generate a flash chart:

select null link
'Available' as "Available",
to_number(max_licenses - consumed_licenses)
from software_detail
where capture_date = trim(GET_CAPTURE_DATE)
and software_product = :p1
and software version = :p2

union

select null link
'Consumed' as "Consumed",
to_number(consumed_licenses)
from software_detail
where capture_date = trim(GET_CAPTURE_DATE)
and software_product = :p1
and software version = :p2

The following query returns: (correct value) ran on sql developer 3.2
Available = 32
consumed = 8


But the 2d doughnut flash chart shows:
Available = 39
Consumed = 1

How is this possible?

Oracle 11.2.0.3 RAC on Windows 2008 R2
APEX 4.2.1.00.0 with Apex Listener 2.0 on Apache Tomcat 6.
  • 1. Re: Flash chart show incorrect data
    Howard (... in Training) Pro
    Currently Being Moderated
    Hello,

    Which licenses are being reported as different?

    Have you compared SQL Developer query output to APEX SQLWorkshop -- SQL Commands window output to check this?

    Howard
  • 2. Re: Flash chart show incorrect data
    guyenko Newbie
    Currently Being Moderated
    Howard,

    As you suggested, I tried the chart query on APEX SQL Developer and got the same value shown in the graph:

    available = 32
    consumed = 8

    When the same query is ran using SQL developer 3.2 the result is as follows:

    available = 35
    consumed = 5
    ( this is the correct value).

    I don't understand why APEX is returning/showing the incorrect value.

    Futhermore, the following error tends to show up in SQL developer from time to time

    ORA-01801-date format is to long for internal buffer

    I don't know if this is relevant.

    Edited by: guyenko on Jun 4, 2013 5:17 AM

    Edited by: guyenko on Jun 4, 2013 5:17 AM
  • 3. Re: Flash chart show incorrect data
    Howard (... in Training) Pro
    Currently Being Moderated
    Good check.

    But what I should have / meant to asked was: Can you actually print the identifiying information for each of the "consumed" licenses in each case? Then we can tell which ones APEX identifies as "consumed" that SQL Developer doesn't identify as "consumed"?

    Looking at your code -- what could possibly be different? Well, when debugging differences like this, what's one of the first things that catches your eye? Why, dates of course! There's a real good chance date conversion is being handled differently between the two. Can you print the dates in both instances?

    Howard
  • 4. Re: Flash chart show incorrect data
    guyenko Newbie
    Currently Being Moderated
    Howard,

    This morning I compared the output from slq developer and the apex graph and they match. I did not do anything special. I will continue to monitor this issue.

    Thank you for your help!

    Ivan

    Edited by: guyenko on Jun 6, 2013 7:27 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points