PDA

View Full Version : MDX help



chang33
09-28-2003, 11:01 PM
Hi,
I'm starting to write a simple OLAP program by using mondrian.
This is the part of my database schema.
CallLog
--------
CallID
City
ServiceType
I want to put City and ServiceType in rows and call counts (by using CallID) in colume.
This is my XML schema.
<?xml version="1.0"?>
<Schema name="Helpdesk">
<Cube name="CallAnalysis">
<Table name="CallLog"/>
<Dimension name="City Dim">
<Hierarchy hasAll="true" allMemberName="All City">
<Level name="city" column="CITY" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
<Dimension name="ServiceType Dim">
<Hierarchy hasAll="true" allMemberName="All Service">
<Level name="ServiceType" column="SERVICETYPE" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
<Measure name="Service Count" column="CALLID" aggregator="count" formatString="#,###"/>
</Cube>
</Schema>
And this is my MDX.
select
{[Measures].[ServiceCount]} on columns,
{([City Dim].[All City], [ServiceType Dim].[All Service])} ON rows
from CallAnalysis
This is the error message in browser.
org.apache.jasper.JasperException: Internal error: while counting members of level '[City Dim].[city]'; sql=[select count(*) as "c0" from (select distinct "CallLog"."CITY" as "c0" from "CallLog" "CallLog") "init"]
I modified the sql statement to
"select count(*) from (select distinct CallLog.City from CallLog)" and ran it in sqlplus and it worked.
Did I make something wrong?
Thanks in advance.

chang33
09-28-2003, 11:41 PM
I have found out the problem.
Case sensitive problem.
I changed <Table name="CallLog"/> to <Table name="CALLLOG"/> and it was OK.