-3
LOOP의 두 번째 IF 문에 PLS-00103 오류가 발생합니다.ORA-00922 (업데이트 문 포함)
이 절차 그리고 업데이트의 열이 모두 차 포함 널의 가능성이 없기 때문에 키. 역할-id 컬럼은 NO NULL 제약 조건이있다.[오류] PLS-00103 (17 : 13)는 PLS-00103 :
: 심볼> 중 하나를 예상 할 때 "IF"다음 발생했습니다. (* @ % & - +/모드 나머지 렘에서 다음 및 또는 "다음"F 교체되었을 || MULTISET 기호 .... 여기
create procedure sp_fix_property_role as
-- make sure the role_id contains an offense_party_id
cursor curs_property is select p.*
from t_offense o inner join t_property p on p.offense_id = o.offense_id
where receive_date > to_date('12/01/2013','mm/dd/yyyy');
cursor curs_offense_party is select op.*
from t_offense_party op inner join t_offense o on o.offense_id = op.offense_id
where receive_date > to_date('12/01/2013','mm/dd/yyyy');
begin for cp1 in curs_property loop
for co1 in curs_offense_party loop
--when property offense = offense party offense
--and property role <> offense party id
if cp1.offense_id = co1.offense_id
if cp1.role_id <> co1.offense_party_id then
--then find property role = offense party person
if cp1.role_id = co1.person_id then
--replace property role with offense party id
update t_property set t_property.role_id = co1.offense_party_id
where t_property.property_id = cp1.property_id;
end if;
end if;
end if;
end loop; end loop; end sp_fix_property_role;
이는 11g 클라이언트와 두꺼비 컴파일되고
oaksong
질문을 편집 해주십시오 오류 메시지의 정확한 텍스트 curs_property 커서의 선언을 수정해야 할 수도 있습니다. 감사. –