Hello,

I have just installed the bi-server 4.8.0 stable and I was experimenting with the User Console. Since I'm most familiar with SQL Server, I loaded up the data from the Prashant Raju tutorial (the one in the Sticky Thread) in my local SQL Server install. From the user console, I configured a new Data Source of the SQL Query Source Type. The exact query is:
SELECT ORDERNUMBER
,PRODUCTCODE
,QUANTITYORDERED
,PRICEEACH
,ORDERLINENUMBER
,TOTALPRICE
,ORDERDATE
,REQUIREDDATE
,SHIPPEDDATE
,STATUS
,COMMENTS
,CUSTOMERNUMBER
,TIME_ID
,QTR_ID
,MONTH_ID
,YEAR_ID
FROM dbo.ORDERFACT

Then I tried to create a New Analysis on this Data Source, with Status as Dimension and Count Distinct OrderNumber as Measure. After a lot of errors on the tomcat window, I activated the debbuging of SQL queries generated by Mondrian. One of the is just plain wrong in the T-SQL dialect:
select count(*) from (select distinct
"FACT"."STATUS" as "c0"
from
(SELECT ORDERNUMBER
,PRODUCTCODE
,QUANTITYORDERED
,PRICEEACH
,ORDERLINENUMBER
,TOTALPRICE
,ORDERDATE
,REQUIREDDATE
,SHIPPEDDATE
,STATUS
,COMMENTS
,CUSTOMERNUMBER
,TIME_ID
,QTR_ID
,MONTH_ID
,YEAR_ID
FROM dbo.ORDERFACT) as "FACT")

The error is that the subquery needs and alias (just add an "AS Temp_Table" to the end of the query).

Has someone seen this happening before? How do I get around it?

Moderators, can I\should I crosspost this to the Mondrian subforum?