Hai, this is what i've done...
i need to display ename and thier manager...the manager is based on the empno...then for the employees who do not have any manager, raise an exception and display an exception message.

this is the error massage that i've got
----------------------------------------------------------
EXCEPTION
*
ERROR at line 37:
ORA-06550: line 37, column 2:
PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the
following:
begin declare end exit for goto if loop mod null pragma raise
return select update while
<<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall

ORA-06550: line 43, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
begin function package pragma procedure form
-----------------------------------------------------------------


set serveroutput on

declare

TYPE a IS TABLE OF emp.ename%TYPE INDEX BY BINARY_INTEGER;

b a;

TYPE c IS TABLE OF emp.ename%TYPE INDEX BY BINARY_INTEGER;

d c;

cursor c1 is select ename,empno,mgr from emp;
cursor c3 is select ename,empno,mgr from emp;

i number(2):=0;
no_mgr EXCEPTION;

begin

dbms_output.put_line('Manager' ||' '|| 'Emp');
dbms_output.put_line('______________________________________');

for c2 in c1 loop
b(i):=c2.ename;

for c4 in c3 loop

if c4.empno = c2.mgr then
d(i):=c4.ename;
dbms_output.put_line(d(i) || ' '|| b(i));

elsif c2.mgr = 'NULL' then
RAISE no_mgr;
end if;

end loop;

EXCEPTION
WHEN no_mgr THEN
d(i):= 'NO MANAGER';
i := i+1;

end loop;
end;
/