大家帮忙看一下
create or replace Procedure Sp_Spname
(
zhen varchar2,
cun varchar2,
zu varchar2
)
As
Cursor Zzs_Cursor Is
Select * From zjbsc@Orcl_74 where sszc=zhen and ssc=cun and zld=zu;
Row_Cursor Zzs_Cursor%Rowtype;
Row_Diqu are_districtinfodic%Rowtype;
v_Count Integer;
Begin
If Zzs_Cursor%Isopen = False Then
Open Zzs_Cursor;
End If;
Loop
Fetch Zzs_Cursor
Into Row_Cursor;
Exit Zzs_Cursor%Notfound Or Zzs_Cursor%Notfound Is Null;
Begin
v_Count := 1;
select * Into Row_Diqu from V1 where V1.dqmc1||V1.dqmc in (select ssc||zld from zjbsc@orcl_74 where sszc=zhen and ssc=cun);
--Select * Into Row_Diqu From are_districtinfodic Where Xxx = Row_Cursor.Xxx;
Exception
When No_Data_Found Then
v_Count := 0;
End;
If v_Count = 1 Then
Insert Into p_personinfo
Values
(seqare_districtinfodic.nextval,Row_Cursor.XM,Row_Cursor.XB,Row_Cursor.MZ,Row_Cursor.GMSFZHM,Row_Cursor.CSRQ,Row_Diqu.aid,Row_Cursor.jzdz,'',Row_Cursor.hzxz,Row_Cursor.hyzt,0,Row_Cursor.xzzt,sysdate);
End If;
End Loop;
Close Zzs_Cursor;
End Sp_Name;
PROCEDURE MYDEMO.SP_SPNAME 编译错误
错误:PLS-00103: 出现符号 "%"在需要下列之一时:
. ; when
行:21
文本:Exit Zzs_Cursor%Notfound Or Zzs_Cursor%Notfound Is Null;
错误:PLS-00103: 出现符号 "BEGIN"
行:22
文本:Begin
错误:PLS-00103: 出现符号 "IF"在需要下列之一时:
end not pragma final
instantiable order overriding static member constructor map
行:30
文本:If v_Count = 1 Then
错误:PLS-00103: 出现符号 "CLOSE"在需要下列之一时:
end not pragma final
instantiable order overriding static member constructor map
行:36
文本:Close Zzs_Cursor;
错误:PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
pragma
行:38
文本:/*end info_people;*/
------解决方案--------------------这结帖率 前面好几个帖子没回复也没结 谁还敢回呢
------解决方案--------------------
SQL code
CREATE OR REPLACE Procedure Sp_Spname(zhen varchar2,
cun varchar2,
zu varchar2) As
Cursor Zzs_Cursor Is
Select *
From zjbsc@Orcl_74
where sszc = zhen
and ssc = cun
and zld = zu;
Row_Cursor Zzs_Cursor%Rowtype;
Row_Diqu are_districtinfodic%Rowtype;
v_Count Integer;
Begin
If Zzs_Cursor%Isopen Then
Open Zzs_Cursor;
End If;
Loop
Fetch Zzs_Cursor
Into Row_Cursor;
Exit when Zzs_Cursor%Notfound;
Begin
v_Count := 1;
select *
Into Row_Diqu
from V1
where V1.dqmc1 || V1.dqmc in
(select ssc || zld
from zjbsc@orcl_74
where sszc = zhen
and ssc = cun);
--Select * Into Row_Diqu From are_districtinfodic Where Xxx = Row_Cursor.Xxx;
Exception
When No_Data_Found Then
v_Count := 0;
End;
If v_Count = 1 Then
Insert Into p_personinfo
Values
(seqare_districtinfodic.nextval,
Row_Cursor.XM,
Row_Cursor.XB,
Row_Cursor.MZ,
Row_Cursor.GMSFZHM,
Row_Cursor.CSRQ,
Row_Diqu.aid,
Row_Cursor.jzdz,
'',
Row_Cursor.hzxz,
Row_Cur