ORA-22054 下溢错误

发布于 2024-08-09 00:30:49 字数 718 浏览 5 评论 0原文

我试图让我的存储过程在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧城烟雨 2024-08-16 00:30:49

假设您可以从 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文