从 C# 调用 oracle 函数
我有一个 Oracle 函数 GetEmployeeDetails,它将所有员工详细信息保存到临时表 TempEmployeeDetails 表中。
我必须调用该函数,然后对临时表进行选择查询。函数调用成功,但选择查询抛出以下错误。
“开始:输出:= MyPackage.GetEmployeeDetails(” +“:员工ID,”);从 TempEmployeeDetails 中选择 *; END;"
上面的查询给了我这个错误:
ORA-06550: line 1, column 98:
PLS-00428: an INTO Clause is Expected in this SELECT statements
I have an Oracle function GetEmployeeDetails which saves all the employee details into a temporary table TempEmployeeDetails table.
I have to call the function followed by a select query on the temporary table. The function call succeeds but the select query throws the following error.
"BEGIN :Output := MyPackage.GetEmployeeDetails("
+ ":EmployeeId,"); SELECT * FROM TempEmployeeDetails; END;"
The above query is giving me this error:
ORA-06550: line 1, column 98:
PLS-00428: an INTO clause is expected in this SELECT statement
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为如果您使用的是 OracleClient,则应该将查询与函数调用分开,因此代码可能是:
现在要从 tempEmployeeDetails 获取数据,请进行另一个查询,如下所示:
I think you should separate the query from the function call, if you are using OracleClient so the code probably by:
now to get the data from tempEmployeeDetails make another query like the following: