Hi,
I am getting a similar error as in the following post http://jira.pentaho.com/browse/MONDRIAN-1510 on Mondrian+Sybase, which is caused by a missing alias at the generated SQL query.
In the link I read that this is fixed, but I have tried with the following mondrian jars and I am still getting the error:
3.6.6
4.3.0.1
4.6.0.0
So where can I get the fixed version ?
Thank you!
Edit: I think it is the same issue:
My schema:
<?xml version="1.0"?>
<Schema name="GenericDynaListSchema">
<Cube name="GenericDynaListCube">
<View alias="GenericDynaListCube">
<SQL dialect="generic">
<=!=[=C=D=A=T=A=[SELECT * FROM (select * from job_consumption_data where fiscal_year >= 2010) wrappedQry]=]=>
</SQL>
</View>
<Dimension name="part_number">
<Hierarchy hasAll="true">
<Level name="part_number" visible="true" column="part_number" type="String" uniqueMembers="false" />
</Hierarchy>
</Dimension><Measure name="qty_produced" column="qty_produced" aggregator="sum" formatString="Standard"/></Cube>
</Schema>
It is a very simple table with fields: id, part_number, qty_produced. Nothing more.
Query if putting "qty_produced" in the measures, and "part_number" in the rows:
select {[Measures].[qty_produced]}
ON COLUMNS,
{Hierarchize(
{[part_number].[part_number].Members}
)} ON ROWS
from [GenericDynaListCube]
SQL generated (and giving the error):
Mondrian Error:Internal error: Reading row count from query [select distinct "GenericDynaListCube"."part_number" as "c0" from (SELECT * FROM (select * from job_consumption_data where fiscal_year >= 2010) wrappedQry) as "GenericDynaListCube"]; sql=[select count(*) from (select distinct "GenericDynaListCube"."part_number" as "c0" from (SELECT * FROM (select * from job_consumption_data where fiscal_year >= 2010) wrappedQry) as "GenericDynaListCube")]
Error: SybSQLException: SQL Anywhere Error -131: Syntax error near '(end of line)' on line 1
If you change
select count(*) from (select distinct "GenericDynaListCube"."part_number" as "c0" from (SELECT * FROM (select * from job_consumption_data where fiscal_year >= 2010) wrappedQry) as "GenericDynaListCube")
to
select count(*) from (select distinct "GenericDynaListCube"."part_number" as "c0" from (SELECT * FROM (select * from job_consumption_data where fiscal_year >= 2010) wrappedQry) as "GenericDynaListCube") AS DUMMY
then the query works. I guess this is the same issue in the link?