Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting the following error :ORA-06502:PL/SQL: numeric or value error on one our Packages that runs daily for an appworx system job.

Here is the package below. The part (EXCLUDEUSER) were the error occurred is in bold. I am a newbie to SQL and I am not sure what the fix for this will be.

procedure p_empl_dept_move_lock
is
empDeptMoveRecord tt_eas.oracle_acct.employee_dept_move_cur%rowtype;
l_error_msg varchar2(250) := null;
excludeUser varchar2(1);
lHasIpExceptions varchar2(1);
lIpExceptionSuccess boolean := false;
lIpExceptionHadFailure boolean := false;
lEmpCount number := 0;
lTosmEmpCount number := 0;
lEasLdapEntryCount number := 0;
lTosmLdapEntryCount number := 0;
lEasEntryString varchar2(4000) := '';
lTosmEntryString varchar2(4000) := '';
lEasEmail varchar2(32000) := '';
lTosmEmail varchar2(32000) := '';
lLdapEntry tt_eas.oracle_acct.ldap_entry;
lLdapEntryTable tt_eas.oracle_acct.ldap_entry_table;
lLdapSuccess boolean := false;
lLdapHadFailure boolean := false;
begin
open employee_dept_move_cur;
loop
excludeUser := 'N';
fetch employee_dept_move_cur into empDeptMoveRecord;
exit when employee_dept_move_cur%notfound;

lEmpCount := lEmpCount + 1;

-- IP Exception Checking
lHasIpExceptions := f_has_ip_exceptions(empDeptMoveRecord.username, lIpExceptionSuccess);
if not lIpExceptionSuccess then
lIpExceptionHadFailure := true;
end if;

-- LDAP Entry Checking
lEasLdapEntryCount := 0;
lTosmLdapEntryCount := 0;
lEasEntryString := '';
lTosmEntryString := '';
lLdapEntryTable := f_get_ldap_entries(empDeptMoveRecord.eraider_id, lLdapSuccess);
if not lLdapSuccess then
lLdapHadFailure := true;
end if;
if lLdapEntryTable.count > 0 then
for i in lLdapEntryTable.first .. lLdapEntryTable.last
loop
lLdapEntry := lLdapEntryTable(i);



Any help will be appreciated

Thanks
Posted
Updated 31-Jan-15 2:56am
v2
Comments
CHill60 31-Jan-15 5:59am    
This is not SQL Server. Your Tags are wrong. If anyone has filtered on "Oracle" then they won't see your question
MayFad 31-Jan-15 8:48am    
The error is indeed an Oracle error. I got the tag messed up. Thanks for letting me know
CHill60 31-Jan-15 6:10am    
Has this ever worked as it stands or are these changes?
And you are absolutely sure that is the line that errored?
If you change the declaration to varchar2(2) does the problem go away?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900