SYMPTOM:
The following error occurs when executing a report in Strategy Developer 9.4.x and 10.x in an environment where Warehouse Partition Mapping is implemented on DB2 UDB.
Error: SQL Generation Complete
QueryEngine encountered error: Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. SQL0104 - Token was not valid. Valid tokens: <IDENTIFIER>.
The SQL pass rendering this error might look similar to the following:
insert into session.ZZXXXXXX
select distinct pa11.ITEM_NUM ITEM_NUM,
pa11.WJXBFS1 WJXBFS1,
VALUE((pa11.WJXBFS1 / (CASE 8.0 WHEN 0 THEN NULL ELSE 8.0 END)), 0) WJXBFS2
from session.ZZOS205S01 pa11
join TablePrefix.{Partition_Base_Table } a12
on (pa11.ITEM_NUM = a12.ITEM_NUM)
join TablePrefix.LU_WEEK a13
on (a12.WEEK_ID = a13.WEEK_ID)
where a13.WEEK_DATE between `2008-01-31` and `2008-04-10`
CAUSE:
The '{Partition_Base_Table }' is being used as a relationship table. Partition mapping tables are only intended to be used as base tables and not for attribute relationships.
ACTION:
Change the data model to relate the attributes without using any partition mapping tables.