Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL: numeric or value error: Bulk Bind: Truncated Bind? Please help

440837May 31 2005 — edited Jun 2 2005
Hi,

I'm in a bind, running across an error that I can't seem to figure out. Does anyone have any suggestions? I marked line 190 towards the bottom.

ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind
ORA-06512: at "P_HAR_BULK_COLLECT", line 190
ORA-06512: at line 1

Here's part of the code that references the error:

TYPE alum_rec IS RECORD
( id apbrsap.apbrsap_id%TYPE,
ssn spbpers.spbpers_ssn%TYPE,
name_prefix apbrsap.apbrsap_name_prefix%TYPE,
first_name apbrsap.apbrsap_first_name%TYPE,
mid_name apbrsap.apbrsap_mid_name%TYPE,
last_name apbrsap.apbrsap_last_name%TYPE,
name_suffix apbrsap.apbrsap_name_suffix%TYPE,
sex apbrsap.apbrsap_gender%TYPE,
deceased_ind apbrsap.apbrsap_deceased_ind%TYPE,
maiden_middle varchar2(25),
maiden_last apbcons.apbcons_maiden_last_name%TYPE,
spouse_info varchar2(90),
children_info varchar2(200),
solicit_info varchar2(30),
pref_address_ind varchar2(1),
dt_last_addr_updated date,
lost_ind varchar2(1),
lost_address varchar2(250),
res_street_line_1 apbrsap.apbrsap_street_addr1%TYPE,
res_street_line_2 apbrsap.apbrsap_street_addr2%TYPE,
res_street_line_3 apbrsap.apbrsap_street_addr3%TYPE,
res_city apbrsap.apbrsap_city%TYPE,
res_state apbrsap.apbrsap_state%TYPE,
res_zip apbrsap.apbrsap_zip%TYPE,
res_country varchar2(30),
res_phone apbrsap.apbrsap_home_phone%TYPE,
bus_street_line_1 apbrsap.apbrsap_bus_street_addr1%TYPE,
bus_street_line_2 apbrsap.apbrsap_bus_street_addr2%TYPE,
bus_street_line_3 apbrsap.apbrsap_bus_street_addr3%TYPE,
bus_city apbrsap.apbrsap_bus_city%TYPE,
bus_state apbrsap.apbrsap_bus_state%TYPE,
bus_zip apbrsap.apbrsap_zip%TYPE,
bus_country varchar2(30),
bus_phone apbrsap.apbrsap_bus_phone%TYPE,
email apbrsap.apbrsap_pref_email%TYPE,
job_info varchar2(125),
career_code apbcons.apbcons_dott_code%TYPE,
degree_info varchar2(400) );

alumni_rec alum_rec;

TYPE alum_table IS TABLE OF alumni_rec%TYPE
INDEX BY BINARY_INTEGER;

CURSOR c_all IS
( SELECT apbrsap_id as id,
spbpers_ssn as ssn,
apbrsap_name_prefix as prefix,
apbrsap_first_name as first_name,
apbrsap_mid_name as mi,
apbrsap_last_name as last_name,
apbrsap_name_suffix as suffix,
apbrsap_gender as sex,
apbrsap_deceased_ind as deceased_ind,
decode(apbrsap_mid_name, apbcons_maiden_last_name, apbcons_maiden_last_name, apbrsap_mid_name) as maiden_middle_name,
apbcons_maiden_last_name as maiden_last_name,
f_spouse_name(apbrsap_pidm) as spouse_name,
f_children_names(apbrsap_pidm) as children_name,
f_no_solicit_type_ind(apbrsap_pidm) as solicit_ind,
decode(apbcons_atyp_code_pref,'PR','R','BU','B',null) as pref_address_ind,
f_last_date_addr_updated(apbrsap_pidm) as pref_last_addr_date,
f_lost_address_ind(apbrsap_pidm) as lost_ind,
f_lost_address(apbrsap_pidm) as lost_address,
ltrim(rtrim(apbrsap_street_addr1,' '),' ') as res_street_line_1,
ltrim(rtrim(apbrsap_street_addr2,' '),' ') as res_street_line_2,
ltrim(rtrim(apbrsap_street_addr3,' '),' ') as res_street_line_3,
ltrim(rtrim(apbrsap_city,' '),' ') as res_city,
ltrim(rtrim(apbrsap_state,' '),' ') as res_state,
ltrim(rtrim(apbrsap_zip,' '),' ') as res_zip,
ltrim(rtrim(f_get_nation_desc(apbrsap_country),' '),' ') as res_country,
apbrsap_home_phone as res_phone,
ltrim(rtrim(apbrsap_bus_street_addr1,' '),' ') as bus_street_line_1,
ltrim(rtrim(apbrsap_bus_street_addr2,' '),' ') as bus_street_line_2,
ltrim(rtrim(apbrsap_bus_street_addr3,' '),' ') as bus_street_line_3,
ltrim(rtrim(apbrsap_bus_city,' '),' ') as bus_city,
ltrim(rtrim(apbrsap_bus_state,' '),' ') as bus_state,
ltrim(rtrim(apbrsap_bus_zip,' '),' ') as bus_zip,
ltrim(rtrim(f_get_nation_desc(apbrsap_bus_country),' '),' ') as bus_country,
apbrsap_bus_phone as bus_phone,
ltrim(rtrim(apbrsap_pref_email,' '),' ') as email,
f_job_info(apbrsap_pidm) as job_info,
apbcons_dott_code as career_code,
f_degree_info(apbrsap_pidm) as academic_info
FROM apbrsap,
apbcons,
spbpers
WHERE apbrsap_pref_donor_type = 'ALUM'
AND apbrsap_pidm = apbcons_pidm
AND apbrsap_pidm = spbpers_pidm(+) );

alumni_table alum_table;

BEGIN

file_id := UTL_FILE.FOPEN('xyz', v_file, 'w');

OPEN c_all;
LOOP
FETCH c_all BULK COLLECT INTO alumni_table LIMIT 1000; <<< LINE 190 ***********

FOR i IN 1 .. alumni_table.count LOOP
alumni_rec := alumni_table(i);
v_id := alumni_rec.id;
v_ssn := alumni_rec.ssn;

Any help would be greatly appreciated.

Thanks,
Eric
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2005
Added on May 31 2005
3 comments
531 views