在过程中调用过程

发布于 2024-12-29 03:48:53 字数 667 浏览 0 评论 0原文

我在包内有以下过程结构:

PROCEDURE proc_All
(
   start IN date := null,
   end IN date := null,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor
);

PROCEDURE proc_1
(
   start1 IN date := null,
   end1 IN date := null,
   cursor1_1 OUT sys_refcursor,

);   
PROCEDURE proc_3
(
   start2 IN date := null,
   end2 IN date := null,
   cursor1_2 OUT sys_refcursor,

);  
PROCEDURE proc_3
(
   start3 IN date := null,
   end3 IN date := null,
   cursor1_3 OUT sys_refcursor,

); 

现在我的要求是我希望第一个过程 proc_All 调用所有三个下一个过程,因为我希望程序调用 proc_All 。在其他程序内部调用时(无论它们是 IN 或 OUT 类型),我如何将变量传递给程序,

任何人都可以帮忙..提前谢谢

i have following structure of a procedures inside a package:

PROCEDURE proc_All
(
   start IN date := null,
   end IN date := null,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor
);

PROCEDURE proc_1
(
   start1 IN date := null,
   end1 IN date := null,
   cursor1_1 OUT sys_refcursor,

);   
PROCEDURE proc_3
(
   start2 IN date := null,
   end2 IN date := null,
   cursor1_2 OUT sys_refcursor,

);  
PROCEDURE proc_3
(
   start3 IN date := null,
   end3 IN date := null,
   cursor1_3 OUT sys_refcursor,

); 

Now my requirement is that i want first procedure proc_All to call all three next procedure, as i want proc_All to be called by program. how can i pass variables to a procedure when calling inside other procedure (weather they are IN or OUT type)

can anyone please help.. thanx in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

子栖 2025-01-05 03:48:53

这应该可行(尽管我不确定您是否可以使用关键字“end”作为参数名称):

PROCEDURE proc_All
(
   start IN date := null,
   end IN date := null,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor
)
IS
BEGIN

  proc_1
  (
     start1 => start,
     end1 => end,
     cursor1_1 => cursor1
  );   

  proc_2
  (
     start2 => start,
     end2 => end,
     cursor1_2 => cursor2
  );   

  proc_3
  (
     start3 => start,
     end3 => end,
     cursor1_3 => cursor3
  );   

END;

This should work (though I am not sure you are allowed to use the keyword "end" as a parameter name):

PROCEDURE proc_All
(
   start IN date := null,
   end IN date := null,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor,
   cursor1 OUT sys_refcursor
)
IS
BEGIN

  proc_1
  (
     start1 => start,
     end1 => end,
     cursor1_1 => cursor1
  );   

  proc_2
  (
     start2 => start,
     end2 => end,
     cursor1_2 => cursor2
  );   

  proc_3
  (
     start3 => start,
     end3 => end,
     cursor1_3 => cursor3
  );   

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