包
包头:
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;
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;
浙公网安备 33010602011771号