你好,不知道为什么我得到这个错误。 基本上我在这三行中得到它:
PLS-00363: expression 'p_temp_foo.editable.modified_by' cannot be used as an assignment target
PLS-00363: expression 'p_temp_foo.editable.date' cannot be used as an assignment target
PLS-00363: expression 'p_temp_foo.editable.modified_by' cannot be used as an assignment target
过程:
PROCEDURE run_temp_procedure (p_temp_foo IN part_bean, p_member_number IN NUMBER)
IS
t_temp_foo part_bean;
now DATE;
BEGIN
now := SYSDATE;
p_temp_foo.editable:= t_temp_foo.editable;
p_temp_foo.editable.date := SYSDATE;
p_temp_foo.editable.modified_by := p_member_number;
END run_temp_procedure ;
答案 0 :(得分:41)
p_temp_foo
是IN
参数。从本质上讲,这些是只读的。您可以将其定义为IN OUT
参数或OUT
参数。
有关详细信息,请参阅此处: http://plsql-tutorial.com/plsql-passing-parameters-procedure-function.htm
答案 1 :(得分:1)
生成新的VARCHAR2类型变量以分配IN(输入)字符串。
procedure sp_name(
ps_list IN VARCHAR2,
...
other IN's and OUT's
...
)
as
ps_list_copy VARCHAR2 (32000);
begin
ps_list_copy := ps_list;
...
do your works with ps_list_copy
...
...
Exception when others then
....
end sp_name;