aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

PLS-00225: subprogram or cursor 'string' reference is out of scope

PLS-00225: subprogram or cursor 'string' reference is out of scope
Cause: The prefix in a qualified name was a subprogram or cursor which was not in an enclosing scope; i.e., a subprogram or cursor name is being used as a scope qualifier for a reference to an entity (within that subprogram or cursor) that is not in scope. Example: declare x number; type t1 is record (a number); function f return t1 is a number; begin x := f.a; -- legal use of function "f" as a scope qualifier; -- resolves to local variable "a" in function "f". x := f().a; -- legal reference to component "a" of returned record end; begin x := f.a; -- illegal use of function "f" as a scope qualifier x := f().a; -- legal reference to component "a" of returned record end;
Action: a) if the intention was to refer to a local variable of a non-enclosing function, this is not allowed; remove the reference b) if this is a parameterless function, and the the intention was to access a field of the result of a call to this function, then use empty parentheses in the call.

请先 登录 后评论

1 个回答

小智
PLS-00225:子程序或游标' string '引用超出范围,
.原因:限定名称中的前缀是不在封闭范围内的子程序或游标; 即,子程序或游标名称被用作对不在范围内的实体(该子程序或游标)的引用的范围限定符。示例:declare x number; 类型t1是记录(一个数字); 函数f返回t1是一个数字; 开始x:= fa; 功能“f”作为范围限定词的合法使用; - 解析为函数“f”中的局部变量“a”。x:= f()。 - 返回记录结尾部分“a”的法律参考; 开始x:= fa; - 非法使用函数“f”作为范围限定符x:= f()。 - 返回记录结尾部分“a”的法律参考;,
.行动: a)如果意图是指非附加功能的局部变量,则不允许; 删除引用b)如果这是一个无参数的函数,并且意图是访问该函数调用结果的一个字段,则在调用中使用空的括号。,
.
请先 登录 后评论