I am getting similar error when joining two datasets/tables from Oracle. I am using latest version 3.1 (Linux tarball).
It looks like the aliases on the JDBC query are “misaligned” to the actual columns. Maybe something to do with the query including the ROWNUM column aliased as ORA_RNUMOFFSET$.
Here is excerpt sample of the query that was generated to illustrate:
select
"POLICY_TERM"."ORA_RNUMOFFSET$" "ID"
, "POLICY_TERM"."ID" "POLICY_NUM"
, "POLICY_TERM"."POLICY_NUM" "EFFECTIVE_DATE"
, "POLICY_TERM"."EFFECTIVE_DATE" "EXPIRATION_DATE"
, "POLICY_TERM"."EXPIRATION_DATE" "COVA_LIMIT"
, "POLICY_TERM"."COVA_LIMIT" "COVB_LIMIT"
, "POLICY_TERM"."COVB_LIMIT" "COVC_LIMIT"
, "POLICY_TERM"."COVC_LIMIT" "COVD_LIMIT"
, "POLICY_TERM"."COVD_LIMIT" "COVE_LIMIT"
, "POLICY_TERM"."COVE_LIMIT" "COVF_LIMIT"
... it goes on like this
, "POLICY_TERM"."OVMF_OVERALL" "ASSOCIATE_ID"
, "POLICY_TERM"."HOLD_FLAG" "POLICY_ID"
, "POLICY_TERM"."ASSOCIATE_ID" "ID0"
, "POLICY"."ORA_RNUMOFFSET$" "POLICY_NUM0"
, "POLICY"."ID" "BILL_ID"
, "POLICY"."POLICY_NUM" "RENEWAL_TYPE_ID"
, "POLICY"."BILL_ID" "INCEPTION_DATE"
, "POLICY"."RENEWAL_TYPE_ID" "TERMINATION_DATE"
, "POLICY"."INCEPTION_DATE" "ACCOUNTING_STATUS_CODE"
, "POLICY"."TERMINATION_DATE" "STATUS_ID0"
... goes on some more
from
(
select ROWNUM "ORA_RNUMOFFSET$"
, "POLICY_TERM"."ID"
, "POLICY_TERM"."POLICY_NUM"
, "POLICY_TERM"."EFFECTIVE_DATE"
, "POLICY_TERM"."EXPIRATION_DATE"
... and some more
from
"REPORTADMIN"."POLICY_TERM"
where
ROWNUM <= (2000 + 0)) "POLICY_TERM"
where
"POLICY_TERM"."ORA_RNUMOFFSET$" > 0) "POLICY_TERM"
... and more
from
(
select ROWNUM "ORA_RNUMOFFSET$"
, "POLICY"."ID"
, "POLICY"."POLICY_NUM"
, "POLICY"."BILL_ID"
, "POLICY"."RENEWAL_TYPE_ID"
.... and ....
from
"RATERADMIN"."POLICY"
where
ROWNUM <= (2000 + 0)) "POLICY"
where
"POLICY"."ORA_RNUMOFFSET$" > 0) "POLICY" on
"POLICY_TERM"."HOLD_FLAG" = "POLICY"."ORA_RNUMOFFSET$"
The actual error thrown is coming from that last WHERE portion
(java.sql.SQLSyntaxErrorException) ORA-00904: "POLICY"."ORA_RNUMOFFSET$": invalid identifier
Attached query profile
485f9fe0-34cf-4d79-9e25-75696184f367.zip (35.4 KB)