惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
大猫的无限游戏
大猫的无限游戏
B
Blog
J
Java Code Geeks
T
Tailwind CSS Blog
腾讯CDC
A
About on SuperTechFans
GbyAI
GbyAI
H
Help Net Security
IT之家
IT之家
L
LangChain Blog
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
博客园 - 叶小钗
小众软件
小众软件
I
InfoQ
爱范儿
爱范儿
有赞技术团队
有赞技术团队
博客园 - 司徒正美
博客园 - 【当耐特】
Jina AI
Jina AI
D
Docker

博客园 - 老狐狸

关于Update语句在不同数据库中的差别 出错存储过程 F_GETTABLELID 正则表达式求值 - 老狐狸 - 博客园 创建层次查询 ultrawebgrid - 老狐狸 - 博客园 javascript - 老狐狸 - 博客园 case when用法和and 后加条件 exp/imp导出导入工具的使用 ASP.NET1.1中Grid自定义眉头 asp.net1.0 TreeView asp.net2.0 TreeView 创建记录、数组 关闭远程数据库连接 创建游标 创建新的序列 创建隐式游标 创建临时表 更新表(多表相关联)
老狐狸 · 2006-06-23 · via 博客园 - 老狐狸

包头:

create or replace package GetMonthPlan is

  TYPE T_MonthPlan 
IS REF CURSOR;
  
Procedure p_GetMonthStockPlan(sYear       in varchar,
                                sMonth      
in varchar,
                                t_ReturnCur out T_MonthPlan 
--返回的游标
                                );
  
Procedure p_GetMonthPlan(sYear       in varchar,
                                sMonth      
in varchar,
                                t_ReturnCur out T_MonthPlan 
--返回的游标
                                );
end GetMonthPlan;

包体:

create or replace package body GetMonthPlan is
  
Procedure p_GetMonthStockPlan(sYear       in varchar,
                                sMonth      
in varchar,
                                t_ReturnCur out T_MonthPlan) 
is
  
begin
    ImportMonthForestProduct(sYear, sMonth);
    
open t_ReturnCur for
      
select t.estimateyear,
             t.
month,
             t.forestquantity,
             t.fixquantity,
             g.productname,
             g.productCode,
             t.productid
        
from f_monthstockplan t, g_me_productinfo g
       
where t.productid = g.productid
         
and t.estimateyear = sYear
         
and t.month = sMonth
         
order by g.productCode;
  
end p_GetMonthStockPlan;
   
Procedure p_GetMonthPlan(sYear       in varchar,
                                sMonth      
in varchar,
                                t_ReturnCur out T_MonthPlan) 
is
  
begin
    ImportMonthStockProduct(sYear, sMonth);
    
open t_ReturnCur for
      
select t.estimateyear,
             t.
month,
             t.forestquantity,
             t.fixquantity,
             g.productname,
             g.productCode,
             t.productid
        
from f_monthplan t, g_me_productinfo g
       
where t.productid = g.productid
         
and t.estimateyear = sYear
         
and t.month = sMonth
         
order by g.productCode;
  
end p_GetMonthPlan;
end GetMonthPlan;