使用SQL developer忽略oracle 11g中的SQL语句错误

使用SQL developer忽略oracle 11g中的SQL语句错误,oracle,Oracle,您好,我正在尝试执行oracle 11g存储过程。但是,当我在其中使用select语句时,出现了错误。它指示的错误是SQL语句被忽略。请提供帮助。这是我第一次创建存储过程,错误显示在第一个select语句中。我几乎已经尝试了所有可用的解决方案互联网。请帮助我将非常感谢。提前感谢。我的代码如下,错误在第一选择语句中 Create or replace Procedure Wf_disb_process is cursor c1 is select count(1) cnt,agentcode,

您好,我正在尝试执行oracle 11g存储过程。但是,当我在其中使用select语句时,出现了错误。它指示的错误是SQL语句被忽略。请提供帮助。这是我第一次创建存储过程,错误显示在第一个select语句中。我几乎已经尝试了所有可用的解决方案互联网。请帮助我将非常感谢。提前感谢。我的代码如下,错误在第一选择语句中

Create or replace Procedure Wf_disb_process is


cursor c1 is select count(1) cnt,agentcode,agent_name,invdt,disbvchno,disbdt,entryno,
divcode,rate_date,currcode,exchange_rate,vesname,
voynum,vescode,portcode,portname


from(
select distinct agentcode,partyname agent_name,invdt,disbvchno,disbdt,a.entryno,
b.divcode,rate_date,currcode,exchange_rate,vesname,
voynum,b.vescode,b.portcode,portname

from ftxndisbhdr a,ftxndisbdtl b ,cmstvessel c ,cmstport p,fmstacs g,cmstparty h

where b.vescode = c.vescode and p.portcode = b.portcode and g.glaccode = b.glaccode and a.agentcode=h.partycode and
a.entryno = b.entryno and a.entryno=67984 and invdt='25-jul-2014'
and billtype ='I' )

where entryno not in(select entryno from disb_inv_hdr)
group by agentcode,agent_name ,invdt,disbvchno,disbdt,entryno,
divcode,rate_date,currcode,exchange_rate,vesname,
voynum,vescode,portcode,portname;

cursor c2 is  select 

a.agentcode,a.agent_name,a.artcode,a.invdt,a.invno,a.disbvchno,a.disbdt,a.entryno,
b.divcode,a.rate_date,a.currcode,a.exchange_rate,A.fcamt,B.FCAMT ACTAMT,a.vesname,
a.voynum,b.vescode,b.portcode,b.portname,b.remarks ,b.glaccode

FROM (select agentcode,partyname agent_name,artcode,invdt,invno,disbvchno,disbdt,a.entryno,
b.divcode,rate_date,currcode,exchange_rate,fcamt,inramt,vesname,
voynum,b.vescode,b.portcode,portname,b.remarks ,b.glaccode
from ftxndisbhdr a,ftxndisbdtl b ,cmstvessel c ,cmstport p,fmstacs g,cmstparty h

where b.vescode = c.vescode and p.portcode = b.portcode and g.glaccode = b.glaccode and a.agentcode=h.partycode and
a.entryno = b.entryno and a.entryno=67984
and billtype ='E') A,(select agentcode,partyname agent_name,artcode,invdt,invno,disbvchno,disbdt,a.entryno,
b.divcode,rate_date,currcode,exchange_rate,fcamt,inramt,vesname,
voynum,b.vescode,b.portcode,portname,b.remarks ,b.glaccode

from ftxndisbhdr a,ftxndisbdtl b ,cmstvessel c ,cmstport p,fmstacs g,cmstparty h

where b.vescode = c.vescode and p.portcode = b.portcode and g.glaccode = b.glaccode and a.agentcode=h.partycode and
a.entryno = b.entryno and a.entryno=67984
and billtype ='I' and invdt='25-jul-2014') B WHERE A.ENTRYNO=B.ENTRYNO ;
cursor c3 is select agentcode,partyname agent_name,disbvchno,disbdt,a.entryno
,rate_date,currcode,exchange_rate,SUM(fcamt) FCAMT,sum(inramt) inramt
from ftxndisbhdr a,ftxndisbdtl b ,cmstvessel c ,cmstport p,fmstacs g,cmstparty h

where b.vescode = c.vescode and p.portcode = b.portcode and g.glaccode = b.glaccode and a.agentcode=h.partycode and
a.entryno = b.entryno and a.entryno=67984
and billtype ='A'
group by 
agentcode,partyname ,disbvchno,disbdt,a.entryno,rate_date,currcode,exchange_rate, FCAMT,inramt;
vid number;
vdtl_id number;
Vadv_fc number;
vadv_inr number;
Vinv_fc number;
vinv_inr number;
Vest_fc number;
vest_inr number;

begin

for c1_rec in c1 

loop

select max(id_cd) into vid from disb_inv_hdr ;

if vid is null then

vid:=1;

else

vid:=vid+1;

end if;

insert into disb_inv_hdr (ID_CD,
ENTRYNO,
DISBVCHNO,
DOCUMENT_LINK,
DISBDT,
VESCODE,
VESNAME,
AGENTCODE,
AGENT_NAME,
VOYNUM,
PORTCODE,
PORT_NAME,
CURRCODE,
USER_CD,    
UPDATED_DT,
CREATION_DT,
CREATED_BY,
UPDATED_BY,
OWNER,
COCODE,
DIVCODE,
EST_TOTAL,
ACTUAL_TOTAL,
DIFF_TOTAL,
ADVANCE_TOTAL) values
(vid,c1_rec.entryno,c1_rec.DISBVCHNO,
null,
c1_rec.DISBDT,
decode(c1_rec.cnt,1,c1_rec.VESCODE,'9999'),
decode(c1_rec.cnt,1,c1_rec.VESNAME,'NA'),
c1_rec.AGENTCODE,
c1_rec.AGENT_NAME,
decode(c1_rec.cnt,1,c1_rec.VOYNUM,999),
decode(c1_rec.cnt,1,c1_rec.PORTCODE,'NA'),
decode(c1_rec.cnt,1,c1_rec.PORTNAME,'NA'),
c1_rec.CURRCODE,
186,
null,
null,
null,
null,
null,
null,
null,0,0,0,0);

for c2_rec in c2

loop

select max(ID_DTL_CD) into vdtl_id from disb_inv_dtl ;

if vdtl_id is null then

vdtl_id:=1;

else

vdtl_id:=vdtl_id+1;

end if;

insert into disb_inv_dtl (ID_DTL_CD ,                     
ID_CD                          ,
ARTCODE                        ,
INVNO                          ,
INVDT                          ,
GLACCODE                       ,
EST_AMT                        ,
ACT_AMT                        ,
VESCODE                        ,
VESNAME                        ,
VOYNUM                         ,
PORTCODE                       ,
PORT_NAME                      ,
USER_CD                        ,
UPDATED_DT                     ,
CREATION_DT                    ,
CREATED_BY                     ,
UPDATED_BY                     ,
OWNER                          ,
COCODE                         ,
DIVCODE                        ,diff) values
(vdtl_id,vid,c2_rec.artcode,c2_rec.invno,c2_rec.invdt,c2_rec.glaccode,c2_rec.fcamt,c2_rec.actamt,
c2_rec.VESCODE,
c2_rec.vESNAME,
c2_rec.VOYNUM,
c2_rec.PORTCODE,
c2_rec.PORTNAME,
186,
null,
null,
null,
null,
null,
null,
null,c2_rec.fcamt-c2_rec.actamt);
end loop;

begin

select SUM(fcamt) FCAMT,sum(inramt) inramt into Vadv_fc, vadv_inr

from ftxndisbhdr a,ftxndisbdtl b ,cmstvessel c ,cmstport p,fmstacs g,cmstparty h
where b.vescode = c.vescode and p.portcode = b.portcode and g.glaccode = b.glaccode and a.agentcode=h.partycode and
a.entryno = b.entryno and a.entryno=67984
and billtype ='A';

exception

when no_data_found then
null;
end;

begin

select SUM(fcamt) FCAMT,sum(inramt) inramt into Vest_fc, vest_inr

from ftxndisbhdr a,ftxndisbdtl b ,cmstvessel c ,cmstport p,fmstacs g,cmstparty h

where b.vescode = c.vescode and p.portcode = b.portcode and g.glaccode = b.glaccode and a.agentcode=h.partycode and
a.entryno = b.entryno and a.entryno=67984
and billtype ='E';

exception
when no_data_found then
null;

end;

begin

select SUM(fcamt) FCAMT,sum(inramt) inramt into Vinv_fc, vinv_inr

from ftxndisbhdr a,ftxndisbdtl b ,cmstvessel c ,cmstport p,fmstacs g,cmstparty h

where b.vescode = c.vescode and p.portcode = b.portcode and g.glaccode = b.glaccode and a.agentcode=h.partycode and
a.entryno = b.entryno and a.entryno=67984
and billtype ='I';

exception
when no_data_found then
null;
end;

update disb_inv_hdr set est_total=vest_fc,actual_total=vinv_fc,diff_total=vest_fc-vinv_fc ,advance_total= vadv_fc where entryno=c1_rec.entryno;

end loop;

end;

/

请发布错误消息。错误是SQL语句被忽略。错误消息也会有行号。添加整个错误消息可以帮助我们帮助您!错误在第2行:游标c1是select count1。它正在读取语句游标c1,但无法读取语句select。所有Oracle错误都有ORA-NNN编号。您应该发布完整的错误文本。