這是我迄今爲止更新表列>甲骨文
BEGIN
UPDATE t1
set t1.LANGUAGE_ID = (case NETWORK.NID
when 11 then 10
else 7
end)
FROM PROFILE, NETWORK where
PROFILE.STATUS in ('A','U','S','H','I')
AND PROFILE.MID = t1.MID
AND NETWORK.MID = t1.MID
AND t1.IS_DELETED = 'N'
END;
四處錯誤:
"ORA-06550: line 7, column 21:
PL/SQL: ORA-00933: SQL command not properly ended
ORA-06550: line 2, column 18:
PL/SQL: SQL Statement ignored
ORA-06550: line 12, column 4:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
(begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted"
我想更新T1 t1.is_deleted時=」 N',而同樣位於配置文件中的狀態爲AUSHI。所有的表格都有一箇中間的列。任何想法,爲什麼我得到這個錯誤?
非常感謝。雖然現在我得到的ORA-01427:單行子查詢返回多個行 – jgvb 2013-03-19 15:44:21
這只是因爲它是一個複合主鍵,謝謝 – jgvb 2013-03-19 15:58:19