Oracle更新过程问题
我想更新 Oracle 表中的以下过程,但它抛出错误:
CREATE OR REPLACE PROCEDURE update_keywords (aKEYWORD IN VARCHAR2, aCOUNT IN NUMBER)
AS BEGIN
update searchable_keywords
set KEYWORD =:new.aKEYWORD or COUNT =:new.aCOUNT
where KEUWORD_ID = : old.KEYWORD_ID;
END;
这是我的过程。我想更新关键字 &使用 keyword_id
(主键)在 searchable_keywords
表中进行计数,但它抛出如下错误:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/4 PL/SQL: SQL Statement ignored
4/17 PLS-00049: bad bind variable 'NEW.AKEYWORD'
4/31 PL/SQL: ORA-00933: SQL command not properly ended
4/41 PLS-00049: bad bind variable 'NEW.ACOUNT'
您能帮我解决这个问题吗?
I want to update the following procedure in the Oracle table, but it is throwing the error:
CREATE OR REPLACE PROCEDURE update_keywords (aKEYWORD IN VARCHAR2, aCOUNT IN NUMBER)
AS BEGIN
update searchable_keywords
set KEYWORD =:new.aKEYWORD or COUNT =:new.aCOUNT
where KEUWORD_ID = : old.KEYWORD_ID;
END;
This is my procedure. I want to update the keyword & count in the searchable_keywords
table with keyword_id
(primary key) but it is throwing an error as follows:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/4 PL/SQL: SQL Statement ignored
4/17 PLS-00049: bad bind variable 'NEW.AKEYWORD'
4/31 PL/SQL: ORA-00933: SQL command not properly ended
4/41 PLS-00049: bad bind variable 'NEW.ACOUNT'
Can you please help me solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来像一个触发器...您不需要 acount/a 关键字的“:new”,并且需要传入要更新的 ID。例如。
我不确定为什么你会有一个名为“COUNT”的列..除非你试图在该更新中做一些不同的事情,否则其中的“或”显然是错误的..
This looks like a trigger... You don't need the ":new" for acount/akeyword, and you need to pass in the ID you want update. Eg.
I'm not sure why you would have a column named "COUNT".. unless you are trying to do something different in that update, its obviously wrong with that "or" in there..