gpt4 book ai didi

oracle - ORA-06550 : wrong number or types of arguments

转载 作者:行者123 更新时间:2023-12-01 11:16:58 25 4
gpt4 key购买 nike

为什么甲骨文回来了..

ORA-06550: line 9, column 3: PLS-00306: wrong number or types of arguments in call to 'ADD_RULE_RANGE_ATTR' ORA-06550: line 9, column 3: PL/SQL: Statement ignored

当我根据程序规范设置所有类型和参数时。

程序规范

PROCEDURE add_rule_range_attr(
"p_name" IN VARCHAR2,
"p_entity" IN VARCHAR2,
"p_attribute" IN VARCHAR2,
"p_r_negate" IN NUMBER,
"p_ra_comparer1" IN VARCHAR2,
"p_ra_comparer2" IN VARCHAR2
);

最初我的代码在 Oracle APEX 环境中运行,其中过程的参数由输入变量填充(例如 :PX_INPUT_NAME),所以我必须确保我输入的所有变量参数是正确的数据类型。但是,在调用该过程时,我使用的变量的默认值对应于过程参数所请求的数据类型。

调用程序

brg_manager.add_rule_range_attr(
p_name => v_name,
p_entity => v_entity,
p_attribute => v_attribute,
p_r_negate => v_negate,
p_ra_comparer1 => v_comparer1,
p_ra_comparer2 => v_comparer2
);

看看this sqlfiddle一个工作示例。

最佳答案

您需要省略"(过程定义)或在参数标识符周围使用"调用它:

brg_manager.add_rule_range_attr(
"p_name" => v_name,
"p_entity" => v_entity,
"p_attribute" => v_attribute,
"p_r_negate" => v_negate,
"p_ra_comparer1" => v_comparer1,
"p_ra_comparer2" => v_comparer2
);

DBFiddle Demo


来自 Schema Object Names and Qualifiers :

Schema Object Naming Rules

Every database object has a name. In a SQL statement, you represent the name of an object with a quoted identifier or a nonquoted identifier.

A quoted identifier begins and ends with double quotation marks ("). If you name a schema object using a quoted identifier, then you must use the double quotation marks whenever you refer to that object.

关于oracle - ORA-06550 : wrong number or types of arguments,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49586796/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com