01 ORA系列:ORA-00904 标识符无效 invalid identifier
如果希望對常見的Oracle異常ORA報錯解決方案有系統的了解,請看《ORACLE系列異常總結ORA》。
?
轉載請說明出處:https://blog.csdn.net/baidu_37107022/article/details/80874960
?
1.字段名稱與數據庫中關鍵字沖突
修改如下:
?
2.多層嵌套查詢,內層字段別名使用了雙引號
錯誤原因:
內層查出的字段別名使用了,雙引號。
?
當外層要調用里層的字段時,里層字段別名不能使用雙引號。
比如將 report.fid as "reportId" ? 改為 report.fid as reportId 就可以了
?
正確寫法如下:
select?temp.reportId,temp.status,temp.detail??
?from?(select?report.fid????????????????as?reportId,??
???????????????report.ftransactionstatus?as?status,??
???????????????report.ftenementdetail????as?detail??
??????????from?t_trade_transactionreport?report)?temp;
?
3.執行插入時,名稱沒有建立映射
錯誤SQL如下
?
原因:下面的映射字段,沒有給別名
正確SQL如下
?
4.查詢條件使用了雙引號
正確SQL:雙引號改為單引號
SELECT T.FID "id",
T.FKTRANSACTSTEPID "transactStep.id",
T.FSTEPENUM "stepEnum",
T.FSTATUS "status",
T.FACCEPTORENUM "acceptorEnum",
T.FCONTENT "content",
T.FOPINION "opinion",
T.FKAUDITPERSONID "auditPerson.id",
T.FKAUDITORGID "auditOrg.id",
T.FKCREATEBYID "createBy.id",
T.FCREATETIME "createTime",
T.FKCUID "cu.id"
FROM T_TRADE_TRANSFERSMSMODEL T
WHERE T.FSTATUS != 'DELETED'
總結
以上是生活随笔為你收集整理的01 ORA系列:ORA-00904 标识符无效 invalid identifier的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 深入理解和使用Oracle中with a
- 下一篇: 03 ORA系列:ORA-00942 表