bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException ORA-00904 COD DOC NUM

foreword

### The error may exist in com/definesys/mpaas/mybatis/mapper/SWordMybatisMapper.java (best guess)
### The error may involve com.definesys.mpaas.mybatis.mapper.SWordMybatisMapper.query-Inline
### The error occurred while setting parameters
### SQL: select approver,APPROVER_NAME,con1,APPLY_EMPLOYEE_NAME,CODING_APPLICATION,con,APPLICATION_SECTOR,APPLY_DATE,APPLY_EMPLOYEE_CODE,COD_DOC_NUM,APPLICATION_DESCRIPTION,opinion,CODING_ID,con2,APPROVE_DATE from out_excel_view where (CODING_ID = ?)

;  bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00904: "COD_DOC_NUM": invalid identifier

    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
    at com.sun.proxy.$Proxy60.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139)

Error using SQL query

reason

The query field is not in this table

solve

When creating a table or view, add this field and change other people’s code, I didn’t pay much attention, small problem

Leave a Comment

Your email address will not be published. Required fields are marked *