Home » SQL & PL/SQL » SQL & PL/SQL » Error with this populate script. Any Insight?
Error with this populate script. Any Insight? [message #4429] Sun, 08 December 2002 18:17 Go to next message
ks
Messages: 12
Registered: January 2002
Junior Member
Hi,

I can't find what seems to be the problem with our
code that populates this table. I get the following
message:
end; *ERROR at line
15:ORA-06550: line 15, column 4:PLS-00103: Encountered the symbol ";"
when expecting one of the following:loop

on this code:


create table
Relations( Emp1 int, Emp2 int);

declare rels IntSets.IntSet;
relempid int;

begin for r in (select empid, relatives from zzemp) loop
begin
rels := IntSets.cvtString( r.relatives );
for i in 1..IntSets.length( rels ) loop
relempid := IntSets.get(( rels ), i );
if (relempid is not null) then
insert into Relations values( r.empid, relempid );
end if;
end loop;
end loop;
end;
/

I know the IntSets functions work.

Any insights as to why would be greatly
appreciated....
Re: Error with this populate script. Any Insight? [message #4430 is a reply to message #4429] Sun, 08 December 2002 18:30 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
The 'begin' after the cursor loop (before the 'rels := ...' line) should be removed.
Previous Topic: linefeed in a column
Next Topic: missing SELECT keyword error
Goto Forum:
  


Current Time: Thu May 16 07:39:42 CDT 2024