ORACLE 包调用出错ORA-06550: 第 1 行, 第 7 列

查询差旅费的,输入四个参数,输入一个结果集,用于我们的报表代码:SQLcodecreateorreplacepackageP_Rpt_Rate_Evectionistyp... 查询差旅费的,输入四个参数,输入一个结果集,用于我们的报表

代码:
SQL codecreate or replace package P_Rpt_Rate_Evection is
type cur is ref cursor;
procedure Rpt_Rate_Evection
(
StartDate in date,---开始日期
EndDate in date,---结束日期
DepartMent in varchar2,--部门名称
HandleMan in varchar2---报销人

);
end P_Rpt_Rate_Evection;

create or replace package body P_Rpt_Rate_Evection
is
procedure Rpt_Rate_Evection
(
StartDate in date,---开始日期
EndDate in date,---结束日期
DepartMent in varchar2,--部门名称
HandleMan in varchar2---报销人

)
is
-------------变量定义
mysql varchar2(30);
V_DEPARTMENT varchar(50); V_HANDLEMAN varchar(50); V_CARAMOUNT NUMBER; V_TRAINAMOUNT NUMBER; V_FLIGHTAMOUNT NUMBER;
V_MEETAMOUNT NUMBER;V_TAXIAMOUNT NUMBER;V_HOTELAMOUNT NUMBER; V_EDUCATEAMOUNT NUMBER;
V_SUBSIDYAMOUNT NUMBER; V_OTHERAMOUNT NUMBER;V_AMOUNT NUMBER ;
----------游标定义-------------
CURSOR cur is
(select D.NAME,DU.NAME, R.CARAMOUNT,R.TRAINAMOUNT,R.FLIGHTAMOUNT,R.MEETAMOUNT,R.TAXIAMOUNT, R.HOTELAMOUNT ,
R.EDUCATEAMOUNT,R.SUBSIDYAMOUNT, R.OTHERAMOUNT,R.AMOUNT
from rate_evection R ,d_organization D,d_user DU
where R.DEPARTMENT_XID=D.ID and R.HANDLEMAN_XID=DU.ID and D.NAME like DepartMent
and DU.NAME like HandleMan and to_char( R.CREATEDATE)<=to_char( EndDate) AND to_char( R.CREATEDATE)>=to_char(StartDate));

begin
-----创建临时表-------
mysql:='create GLOBAL TEMPORARY table temp ( DEPARTMENT varchar, HANDLEMAN varchar, CARAMOUNT NUMBER(15,2),
TRAINAMOUNT NUMBER(15,2), FLIGHTAMOUNT NUMBER(15,2), MEETAMOUNT NUMBER(10,2),TAXIAMOUNT NUMBER(15,2),
HOTELAMOUNT NUMBER(15,2), EDUCATEAMOUNT NUMBER(10,2), SUBSIDYAMOUNT NUMBER(10,2), OTHERAMOUNT NUMBER(10,2), AMOUNT NUMBER(15,2), )
on commit preserve rows ';
execute immediate mysql;
open cur;
loop
fetch cur into V_DEPARTMENT,V_HANDLEMAN,V_CARAMOUNT,V_TRAINAMOUNT, V_FLIGHTAMOUNT,V_MEETAMOUNT , V_TAXIAMOUNT,
V_HOTELAMOUNT, V_EDUCATEAMOUNT, V_SUBSIDYAMOUNT, V_OTHERAMOUNT, V_AMOUNT;
EXIT WHEN cur%NOTFOUND;
mysql:='INSERT INTO temp
values (V_DEPARTMENT,V_HANDLEMAN,V_CARAMOUNT,V_TRAINAMOUNT,V_FLIGHTAMOUNT,V_MEETAMOUNT ,V_TAXIAMOUNT,
V_HOTELAMOUNT,V_EDUCATEAMOUNT, V_SUBSIDYAMOUNT,V_OTHERAMOUNT,V_AMOUNT)';
execute immediate mysql;
end loop;
close cur;
commit;
mysql:=' select * from temp';
execute immediate mysql;
end;
end P_Rpt_Rate_Evection;

在CS客户端调用时报错

ORA-06550: 第 1 行, 第 7 列:
PLS-00306: 调用 'RPT_RATE_EVECTION' 时参数个数或类型错误
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored

我是ORACLE新手,上面的包是仿照写的,以前没写过?是不是有什么定义不对的地方?编绎正确
展开
 我来答
dingxi6117
2010-08-30 · TA获得超过1833个赞
知道小有建树答主
回答量:1337
采纳率:0%
帮助的人:1227万
展开全部
ORA-06550: 第 1 行, 第 7 列:
PLS-00306: 调用 'RPT_RATE_EVECTION' 时参数个数或类型错误
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored
这里不是说了吗
'RPT_RATE_EVECTION' 参数个数或者类型错误
你看看这个包里面的参数类型和你定义的参数类型是否一致,另外你定义的参数个数和包里面的参数个数是否一致
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式