Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00103
PLS-00103 [message #220494] Tue, 20 February 2007 23:14 Go to next message
rzkhan
Messages: 345
Registered: March 2005
Senior Member
Hi ...Can anyone please sort out the error...

EX > ed
Wrote file afiedt.buf

  1   create or replace procedure upd_sanctioned as
  2   cursor c1 is
  3    select department,count(empid) as a
  4    from emp
  5    where job_status=1
  6   group by department;
  7   x c1%rowtype;
  8   begin
  9   for x in c1 loop
 10  -- dbms_output.put_line(x.a);
 11  update sanctioned set sanct:=x.a
 12  where deptid=x.department;
 13   end loop;
 14* end;
EX > /

Warning: Procedure created with compilation errors.

EX > show err
Errors for PROCEDURE UPD_SANCTIONED:

LINE/COL ERROR
-------- -----------------------------------------------------------------
11/28    PLS-00103: Encountered the symbol "=" when expecting one of the
         following:
         . ( @ =
         The symbol "= was inserted before "=" to continue.

EX > desc sanctioned
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- -----------------------------
 DEPTID                                                         NUMBER(3)
 SANCT                                                          NUMBER(4)
 EXISTING                                                       NUMBER(4)

EX > 



RzKhan
Re: PLS-00103 [message #220500 is a reply to message #220494] Wed, 21 February 2007 00:00 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
hi,

Quote:
update sanctioned set sanct:=x.a


get rid of the ":".

regards,
Re: PLS-00103 [message #220506 is a reply to message #220500] Wed, 21 February 2007 00:37 Go to previous message
rzkhan
Messages: 345
Registered: March 2005
Senior Member
Now it works fine.thank you

Rzkhan
Previous Topic: How should I re-write my procedure to make the update work?
Next Topic: Encryption in Oracle 9i Database
Goto Forum:
  


Current Time: Fri Dec 02 22:47:11 CST 2016

Total time taken to generate the page: 0.11101 seconds