intcount := select count(*) form pan_integralset where psid =apsid(p);
create or replace package body ProAddProductVolume
is
PROCEDURE AddProductVolume
(
acid in varchar2,--活动企业ID
apsid in string_array,--产品编号
aintegral in integral_array,--产品积分
aintegralstartdate in sdate_array,--开始日期
aintegralenddate in edate_array,--结束日期
v_curLottery out int_array --返回的结果集
)
as
v_sqlStr varchar2(4000):='';
intcount number(1);
begin
stime := to_char(aintegralstartdate, 'YYYY-MM-DD HH24:MI:SS');
etime := to_char(aintegralenddate, 'YYYY-MM-DD HH24:MI:SS');
forall p IN apsid.first..apsid.last
intcount := select count(*) form pan_integralset where psid =apsid(p); if intcount =1 then
update pan_integralset set INTEGRAL ='aintegral(p)',INTEGRALSTARTDATE='stime',INTEGRALENDDATE='etime';
else
insert into pan_integralset
(cid,psid,INTEGRAL,INTEGRALSTARTDATE,INTEGRALENDDATE)
values(acid,apsid(p),aintegral(p),aINTEGRALSTARTDATE(p),aINTEGRALENDDATE(p));
end if;
commit;
end AddProductVolume;
end ProAddProductVolume;怎么老是报错列!? intcount := select count(*) form pan_integralset where psid =apsid(p);
这行说 intcount 出现符号在下列之一时.... 后就一堆..
请高手帮我看看
解决方案 »
- UpdateXML函数的弊端,如何解决
- 求一条高效的Oracle语句.
- 在plsql中写了两条语句在pldeveloper分别执行没有问题,一起执行就出错,请问是怎么回事
- 外连接问题,大哥大姐们进来帮下忙..
- 急救!!!!!!!!!!1我把客户的数据备份全删了,只剩下一个ORA数据文件了!
- oracle卸载
- 想接触ORACLE,请朋友们给推荐些好书,十分感谢。
- 在ORACLE9I官方文档中,哪本PDF是介绍EXP/IMP的?
- 数据库为什么自动断连?
- 我用PLSQL DEVELOPER登陆oracle的时候总提示出错
- non-embedded database中文怎么译
- ORACLE 自增ID ,删除后,添加数据又重复出来了,怎么样才能不出来?
forall p IN apsid.first..apsid.last
select count(*)into intcount from pan_integralset where psid =apsid(p) and cid = acid;
if intcount =1 then
update pan_integralset set INTEGRAL ='aintegral(p)',INTEGRALSTARTDATE='stime',INTEGRALENDDATE='etime';
else
insert into pan_integralset
(cid,psid,INTEGRAL,INTEGRALSTARTDATE,INTEGRALENDDATE)
values(acid,apsid(p),aintegral(p),aINTEGRALSTARTDATE(p),aINTEGRALENDDATE(p)); end if;
我可以这么写吗!? 他说我未申明变量P
分不够我再加!
intcount number;V_SQL:='select count(*) form pan_integralset where psid =apsid(p)';
EXECUTE IMMEDIATE V_SQL
INTO intcount ;
declare p int; --定义一下!
应该用into的方式对单结果集赋值。