aiaiDBA

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

13718043309

010-86462881

PLS-00509: Implementation Restriction : Pass a returned record to a temporary identifier before selecting a field

PLS-00509: Implementation Restriction : Pass a returned record to a temporary identifier before selecting a field
Cause: Illegal syntax was used to call a parameter-less function that returns a record or a PL/SQL table of records. When calling a function that takes parameters and returns a record, you use the following syntax to reference fields in the record: function_name(parameters).field_name However, you cannot use the syntax above to call a parameter-less function because PL/SQL does not allow empty parameter lists. That is, the following syntax is illegal: function_name().field_name -- illegal; empty parameter list You cannot just drop the empty parameter list because the following syntax is also illegal: function_name.field_name -- illegal; no parameter list.
Action: Declare a local record or PL/SQL table of records to which you can assign the function result, then reference its fields directly.

请先 登录 后评论

1 个回答

小智
PLS-00509:实现限制:在选择一个字段之前将返回的记录传递给一个临时标识符,
.原因:使用非法语法来调用返回记录的记录或PL / SQL表的无参数的函数。当调用接受参数并返回记录的函数时,可以使用以下语法来引用记录中的字段:function_name(parameters).field_name但是,您不能使用上面的语法来调用无参数的函数,因为PL / SQL不允许空参数列表。也就是说,以下语法是非法的:function_name()。field_name - illegal; 空参数列表您不能只是删除空参数列表,因为以下语法也是非法的:function_name.field_name - illegal; 没有参数列表。,
.操作:声明可以分配函数结果的记录的本地记录或PL / SQL表,然后直接引用其字段。,
.
请先 登录 后评论