ORA-22054 下溢错误
我试图让我的存储过程在 Oracle 中运行,但出现下溢错误。我正在尝试从六个不同的表中删除相关信息。我可以在 SQL Developer 中单独运行删除语句,不会出现错误。当我尝试从 C# 代码隐藏中运行该过程时,我收到返回异常并出现下溢错误。有什么建议吗?
这是代码:
Procedure DeleteProf(i_prof_sk IN NUMBER) IS
BEGIN
delete from nt_fac where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_per_fact where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_per where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_prof_case where nt_prof_sk=i_prof_sk;
delete from nt_prof_fact where nt_prof_sk=i_prof_sk;
delete from nt_prof where nt_prof_sk=i_prof_sk;
END;
I am trying to get my stored procedure working in Oracle and am getting an Underflow error. I am trying to delete related information from six different tables. I can run the delete statements separately in SQL Developer without error. When I try and run the procedure from my C# codebehind I get an exception returned with the Underflow error. Any suggestions?
Here is the code:
Procedure DeleteProf(i_prof_sk IN NUMBER) IS
BEGIN
delete from nt_fac where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_per_fact where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_per where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_prof_case where nt_prof_sk=i_prof_sk;
delete from nt_prof_fact where nt_prof_sk=i_prof_sk;
delete from nt_prof where nt_prof_sk=i_prof_sk;
END;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您可以从 SQL Developer 成功运行存储过程,我的猜测是您为输入参数 i_prof_sk 传递了错误的值,可能类似于您向过程传递了 C# 浮点值。如果这没有意义,请发布调用该过程的 C# 代码,包括参数设置。这里的一些 C# 专家可能会告诉您什么是不对的。我还添加了 C# 标签,也许是为了引起这些人之一的注意。
Under the assumption you can run the stored procedure successfully from SQL Developer, my guess would be that you are passing an incorrect value for the input parameter i_prof_sk, perhaps something like you're passing a C# float value to the procedure. If that doesn't make sense, please post the C# code calling the procedure, including the parameter setup. Some of the C# sharps around here can probably tell you what isn't right. I've also added the C# tag to perhaps get the attention of one of those folks.