Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00410
PLS-00410 [message #226936] Tue, 27 March 2007 00:11 Go to next message
rzkhan
Messages: 370
Registered: March 2005
Senior Member
EX > ed
Wrote file afiedt.buf

  1  create or replace procedure notice(err_Msg out varchar2) as
  2  -- DECLARE VARIABLES
  3  num_days varchar2;
  4  err_code number;
  5  err_Msg varchar2;
  6  -- USER DEFINED EXCEPTIONS
  7  user_expired exception;
  8  -- DECLARE CURSOR TO HOLD EXPIRY DATE AND SYSDATE
  9  cursor c1 is select * from members;
 10  begin
 11  for x in c1 loop
 12  num_days:=x.member_id;
 13  end loop;
 14  if num_days =2006001 then
 15  raise user_expired;
 16  end if;
 17  exception
 18  when user_expired then
 19  err_code := 28002;
 20  err_Msg:='ORA-28002 Your password will expire in';
 21* end;
EX > /

Warning: Procedure created with compilation errors.

EX > show err
Errors for PROCEDURE NOTICE:

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      PL/SQL: Compilation unit analysis terminated
1/1      PLS-00410: duplicate fields in RECORD,TABLE or argument list are
         not permitted

EX > 



what is that error please.
Re: PLS-00410 [message #226942 is a reply to message #226936] Tue, 27 March 2007 00:20 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
You declared err_msg twice. Once as out parameter and once as local variable.
Make it a habit to prefix your variables, according to their scope.
An example would be:
p_ for parameters
t_ or l_ for local variables
a_ or g_ for global variables.
Previous Topic: table design idea
Next Topic: Package
Goto Forum:
  


Current Time: Tue Feb 18 22:40:45 CST 2025