PDA

View Full Version : sql date type



tchao
10-17-2003, 10:06 AM
mondrian seems to be having trouble with sql date types as a level in my dimension
i am using oracle
any help of insight would be appreciated
mondrian.resource.ChainableRuntimeException: Internal error: Error while loading
segment; sql=[select "OLAP_BRANDDETAILS"."BRANDID" as "c0", "OLAP_BRANDDETAILS"
."ACCOUNTID" as "c1", "OLAP_BRANDDETAILS"."DOCUMENTDATE" as "c2", "OLAP_BRANDDET
AILS"."DOCUMENTWEEK" as "c3", "OLAP_BRANDDETAILS"."DOCUMENTMONTH" as "c4", sum("
OLAP_BRANDDETAILS"."MENTIONS") as "m0", count("OLAP_BRANDDETAILS"."DOCUMENTID")
as "m1" from "OLAP_BRANDDETAILS" "OLAP_BRANDDETAILS" where "OLAP_BRANDDETAILS"."
BRANDID" in ('110') and "OLAP_BRANDDETAILS"."DOCUMENTDATE" in ('2003-07-31 00:00
:00.0', '2003-07-30 00:00:00.0') and "OLAP_BRANDDETAILS"."DOCUMENTWEEK" in ('31'
) and "OLAP_BRANDDETAILS"."DOCUMENTMONTH" in ('7') group by "OLAP_BRANDDETAILS".
"BRANDID", "OLAP_BRANDDETAILS"."ACCOUNTID", "OLAP_BRANDDETAILS"."DOCUMENTDATE",
"OLAP_BRANDDETAILS"."DOCUMENTWEEK", "OLAP_BRANDDETAILS"."DOCUMENTMONTH"]

jhyde
10-21-2003, 10:02 AM
Looks like the problem is that Java format dates: '2003-07-31 00:00:00.0'. Oracle no doubt expects dates in its own format: TO_DATE('31-JUL-2003','DD-MON-YYYY').
Please log an RFE to support date columns, but I don't consider this an urgent issue. For now, I suggest you simply store the dates as strings.