關於merge時,出現的ORA-00904 invalid identifier
今天在寫一個merge語句時,總是出現上述錯誤。
merge into JCSS_TicketInfo TT using v_ocainfo v_with
on ( tt.TICKETSEQ = v_with.ticketSeq)
when matched then update set
ticketSeq = v_with.ticketSeq ,
acceptTime = v_with.acceptTime ,
iceFullName = v_with.serviceFullName ,
userCity = v_with.userCity ,
userPhone = v_with.userPhone ,
userLevel = v_with.userLevel ,
serviceType = v_with.serviceType ,
serviceContent = v_with.serviceContent ,
ifComplainRepeat = v_with.ifComplainRepeat ,
userHopeResTime = v_with.userHopeResTime ,
userHlr = v_with.userHlr ,
place = v_with.place ,
terminalType = v_with.terminalType ,
spCode = v_with.spCode ,
serviceCode = v_with.serviceCode ,
groupId = v_with.groupId ,
groupName = v_with.groupName ,
groupType = v_with.groupType
when not matched then
insert( ticketSeq,
acceptTime,
serviceFullName,
userCity,
userPhone,
userLevel,
serviceType,
serviceContent,
ifComplainRepeat,
userHopeResTime,
userHlr,
place,
terminalType,
spCode,
serviceCode,
groupId,
groupName,
groupType
)
values(
v_with.ticketSeq,
v_with.acceptTime,
v_with.serviceFullName,
v_with.userCity,
v_with.userPhone,
v_with.userLevel,
v_with.serviceType,
v_with.serviceContent,
v_with.ifComplainRepeat,
v_with.userHopeResTime,
v_with.userHlr,
v_with.place,
v_with.terminalType,
v_with.spCode,
v_with.serviceCode,
v_with.groupId,
v_with.groupName,
v_with.groupType) ;
檢查我的語句,也沒有欄位錯誤啊。
後來,檢視oracle sql Reference
發現:
Restrictions on the merge_update_clause This clause is subject to the following restrictions:
You cannot update a column that is referenced in the
ON
condition
clause.You cannot specify
DEFAULT
when updating a view.
經修改,取消了針對匹配條件的update列。問題解決。
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/197458/viewspace-1008850/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-00904: invalid identifierIDE
- exp匯出出現:ORA-00904: : invalid identifierIDE
- exp匯出出現:ORA-00904: "POLTYP": invalid identifierIDE
- ORA-00904: "DROP_SEGMENTS": invalid identifierIDE
- 【LISTAGG】 ORA-00904: "WM_CONCAT": invalid identifier (DocIDE
- ORA-00904: "wm_concat":invalid identifier錯誤如何解決?IDE
- [20200312]ORA-00904 POLTYP invalid identifier.txtIDE
- [20210420]ORA-00904 REF invalid identifier 19c dba_obj_audit_opts.txtIDEOBJ
- 關於hibernate的 No row with the given identifier existsIDE
- Python 錯誤 SyntaxError: invalid character in identifierPythonErrorIDE
- [20211022]ORA-00904 REF invalid identifier 19c dba_obj_audit_opts(補充).txtIDEOBJ
- NetBeans 啟動時出現 Invalid jdkhome specified提示BeanJDK
- 考OCP在做vue和oracle賬號關聯的時候容易出現的錯誤:third invalid attemptVueOracle
- 【原】關於Oracle Merge操作的簡單用法Oracle
- 【mysql】關於連線mysql資料庫時出現的時區錯誤time zoneMySql資料庫
- postfix時常提示出現關於set-uid的錯誤(轉)UI
- 關於oracle invalid components問題的解決Oracle
- 當編譯CCBReader時出現 “ CCBAnimationManager.m Use of undeclared identifier 'other‘ ” 解決方法編譯IDE
- laravel出現The cipher and / or key length are invalid 的Bug除錯Laravel除錯
- 關於PHP匯出資料超時的優化PHP優化
- AFNetworking 2.0 出現Use of undeclared identifier AFURLSessionManager錯誤IDESession
- 關於docker-compose up -d 出現超時情況處理Docker
- 關於微信JSSDK中遇到的“invalid signature”的天坑JS
- RAC安裝時出現PRKC-1024 : Invalid netmask: eth0
- Django出現DisallowedHost at / Invalid HTTP_HOST headerDjangoHTTPHeader
- QtCreator下執行opencv出現realloc():pointer invalidQTOpenCV
- 關於LINUX殭屍程式的出現和原理Linux
- iOS 關於側邊欄模態出VC出現的問題iOS
- 關於CSS中的float可能出現的小問題CSS
- mybatis配置時出現org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)MyBatisApacheException
- 開銷退單時出現FRM-40212: Invalid value for field ORDERED_ITEM_DSP.
- 關於python用requests模組時,呼叫text方法出現中文亂碼的解決辦法Python
- 關於MySQL使用的時長MySql
- sql統計時間出現斷點的相關情況SQL斷點
- 關於ORA-12154: TNS:could not resolve the connect identifier specified的問題IDE
- 安裝Tomcat 5 出現Invalid index!錯誤求救TomcatIndex
- 關於 Webview 的混合模式(華為 P30 出現問題)WebView模式
- SQL Server中的Merge關鍵字SQLServer