为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:8.6-2-84-22.05.26-161417-10032-ENT P..
【操作系统】:
【CPU】:
【问题描述】*:### Error querying database. Cause: dm.jdbc.driver.DMException: Fail to cast string ### The error may exist in class path resource [mapper/sqlmapper.xml] ### The error may involve ipm.dal.sqlmapper.InternalSqlMapper.select-Inline ### The error occurred while setting parameters ### SQL: SELECT DISTINCT m.bo_name FROM attachment m WHERE (m.org_id=350001) AND (m.bo_name<>0) ### Cause: dm.jdbc.driver.DMException: Fail to cast string ; Fail to cast string; nested exception is dm.jdbc.driver.DMException: Fail to cast string 通过怎样设置可以 让 bo_name(字符类型) <> 0 执行不报错
如果条件都是字符,那么把0和350001转换为
SELECT DISTINCT m.bo_name FROM attachment m WHERE (m.org_id='350001') AND (m.bo_name<>'0')
试试?