ORA-06502: PL/SQL: numeric or value error: raw variable length too long
Hi All,
Oracle 9.2.0.1.0 and Oracle 10g.
I the following procedure:
CREATE OR REPLACE TYPE Resource_TT AS TABLE OF RAW(16)
CREATE OR REPLACE PROCEDURE GET_ROLEMAPPING_Temp
RoleIds IN NVARCHAR2 DEFAULT NULL ,
Application IN NVARCHAR2 DEFAULT NULL ,
MappingExixts OUT NVARCHAR2
AS
v_Application NVARCHAR2(150) := Application;
resource_list CONSTANT Resource_TT := Resource_TT(RoleIds);
v_temp NUMBER(1, 0) := 0;
BEGIN
SELECT 1 INTO v_temp
FROM DUAL
WHERE EXISTS ( SELECT SecurityGroupId
FROM SKESGResourceMapping
WHERE APPLICATION = v_Application
AND RoleId IN
select column_value
from table(resource_list)
EXCEPTION
WHEN NO_DATA_FOUND THEN
MappingExixts := 'NO';
END;
IF v_temp = 1 THEN
MappingExixts := 'YES';
END IF;
END;
while calling the procedure from sql*plus, the calling block is :
variable MappingExixts nvarchar2(100);
execute Get_RoleMapping_Temp('2f90e7969e0a9045aeb5b5ed7b3da9d6,363aef470e10094281e5040627e3b6f8', 'repo1', :MappingExixts);
print MappingExixts;
It is throwing an error saying:
ORA-06502: PL/SQL: numeric or value error: raw variable length too long
ORA-06512: at "ORACLE1.GET_ROLEMAPPING_TEMP", line 8
Thanks for your valuable time and suggestions
Hi Binoy,
Thanks for your quick response, I increased its size to 200, but I am getting the following error
ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error
ORA-06512: at "ORACLE1.GET_ROLEMAPPING_TEMP", line 8
Similar Messages
-
ORA-06502: PL/SQL: numeric or value error: character string buffer too smal
Hi Guys I am getting error ORA-06502: PL/SQL: numeric or value error: character string buffer too small as it said i thought it would be issue with length of feild but i tried to change is nothihg work i am posing code here if any one can please help me on this
PROCEDURE REPORT
p_rpt_from_dt in varchar2,
p_rpt_to_dt in varchar2,
p_apvr_id in tc_wkr.tc_row_id%type default NULL,
p_rpt_type in varchar2 default NULL,
p_backto_pg in varchar2 default NULL
IS
v_rpt_from_dt date := var_to_date(p_rpt_from_dt);
v_rpt_to_dt date := var_to_date(p_rpt_to_dt);
v_time_str varchar2(15);
cursor period_cur
cp_from_dt date,
cp_to_dt date
is
select beg_dt, end_dt
from jmcs_wk_tprd
where beg_dt <= cp_to_dt -- report end date
and end_dt >= cp_from_dt -- report start date
BEGIN
if sys_security('tcsys', 'tc_reports') != 'GRANTED' then
apps_main.access_denied;
return;
end if;
if lg_debug_fl then
v_time_str := to_char(lg_sysdate, 'hh:mi:ss a.m.');
else
v_time_str := tc_time(lg_sysdate);
end if;
/* get the time card time periods applicable to the report */
lga_tc_strt_dt := lga_null_date;
for recs in period_cur(v_rpt_from_dt, v_rpt_to_dt) loop
lga_tc_strt_dt(lga_tc_strt_dt.count+1) := recs.beg_dt;
lga_tc_end_dt(lga_tc_end_dt.count+1) := recs.end_dt;
end loop;
--if p_apvr_id is NULL then
if p_rpt_type != 'D' then
tc_reporting.reports_header
1,
'Time Card Status Report',
'for '||dd_mon_yyyy(v_rpt_from_dt)||' through '||dd_mon_yyyy(v_rpt_to_dt)||'<BR>'||
'Report Date: '||dd_mon_yyyy(lg_sysdate)||' Time: '||v_time_str,
NULL,
NULL,
NULL,
'javascript:window.close()', /* Backto */
'alert(''Reminder! Click on logo when you are ready to return to previous page'')'
end if;
if p_apvr_id is NULL then
sub_STATUS_BD_ALPHA (v_rpt_from_dt, v_rpt_to_dt, TRUE, p_rpt_type, p_apvr_id);
else
htp.p('<!-- Selected Approver ('||p_apvr_id||') -->');
sub_STATUS_BD_APVR (v_rpt_from_dt, v_rpt_to_dt, p_rpt_type, p_apvr_id);
end if;
htp.p('</body></html>');
EXCEPTION
WHEN OTHERS THEN
error_proc(SQLERRM, SQLCODE, owa_util.get_cgi_env('PATH_INFO'));
htp.p('Error Code is :'||SQLERRM);
END REPORT;
This package in trun call other procedure like below
PROCEDURE sub_STATUS_BD_ALPHA
p_rpt_from_dt in date,
p_rpt_to_dt in date,
p_display_hdr in boolean,
p_rpt_type in varchar2 default 'B',
p_apvr_id in tc_wkr.tc_row_id%type default NULL,
p_tcs_user_id in tc_wkr.tc_row_id%type default NULL
IS
v_time_str varchar2(15);
v_apvr_id tc_wkr.tc_row_id%type := 0;
v_a_user_id tc_wkr.tc_row_id%type; -- approver tcs_user_id
v_cnt integer := 0;
v_people_cnt integer := 0;
v_stat_cd varchar2(2000);
v_display_fl boolean := FALSE;
/*===========================================================================*/
cursor people_cur
cp_from_dt in date,
cp_to_dt in date
is
select
d_full_nm_lfm as name,
tc_row_id as tcs_user_id,
tcw_typ as pay_typ,
tcw_id as pay_id,
sys_strt_date as sys_strt_dt,
sys_end_dt
from tc_wkr
where sys_strt_date <= cp_to_dt
and nvl(sys_end_dt, cp_to_dt) >= cp_from_dt
order by upper(d_full_nm_lfm);
/* find the current or the most recent (if no current) approver */
cursor apvr_cur
cp_tcs_user_id in tc_wkr.tc_row_id%type
is
select
a.f_tc_apvr_id as fk_tcs_apvr_id,
w.d_full_nm_lfm as apvr_name,
w.tcw_typ as apvr_pay_typ,
w.tcw_id as apvr_pay_id,
a.strt_dt,
a.end_dt
from tc_wkr w, tc_ap_asmt a
where a.f_tc_wkr_id = cp_tcs_user_id
and w.tc_row_id = a.f_tc_apvr_id
order by a.strt_dt desc;
/* list of existing time cards UNION required time cards */
cursor tc_cur
cp_tcs_user_id in tc_wkr.tc_row_id%type, /* who's time cards */
cp_from_dt in date, /* report period from date */
cp_to_dt in date /* report period to date */
is
select
stat_cd,
strt_dt,
end_dt
from tc
where strt_dt <= cp_to_dt
and end_dt >= cp_from_dt
and fk_tc_wkrtcw_id = cp_tcs_user_id
UNION
select
'Required' as stat_cd,
beg_dt as strt_dt,
end_dt
from jmcs_wk_tprd
where beg_dt <= cp_to_dt
and end_dt >= cp_from_dt
and beg_dt not in (
select strt_dt
from tc
where strt_dt <= cp_to_dt
and end_dt >= cp_from_dt
and fk_tc_wkrtcw_id = cp_tcs_user_id
order by strt_dt;
BEGIN
if lg_debug_fl then
v_time_str := to_char(lg_sysdate, 'hh:mi:ss a.m.');
else
v_time_str := tc_time(lg_sysdate);
end if;
if p_apvr_id > 0 then
lga_report_out := lga_report_out_null;
v_apvr_id := p_apvr_id;
lga_apvr := lga_apvr_null;
select
d_full_nm_lfm,
tc_row_id,
tcw_id,
tcw_typ
into
lga_apvr(1).apvr_name,
lga_apvr(1).apvr_tcs_id,
lga_apvr(1).apvr_pay_id,
lga_apvr(1).apvr_pay_typ
from tc_wkr
where tc_row_id = v_apvr_id;
if lga_apvr(1).apvr_pay_typ != 'S' then
select decode(bend_empl_fl, 'Y', 'E', 'W')
into lga_apvr(1).apvr_pay_typ
from empl
where empl_id = lga_apvr(1).apvr_pay_id;
end if;
end if;
if p_display_hdr then
if lga_tc_strt_dt.count > 6 then /* more than 6 time periods (1 month) */
lga_width(1) := to_char(.15 * lg_page_width_standard);
lga_width(2) := to_char(.08 * lg_page_width_standard);
for i in 1..lga_tc_strt_dt.count loop
lga_width(lga_width.count+1) := to_char(.09 * lg_page_width_standard);
end loop;
lg_page_width_standard := to_number(lga_width(1)) + to_number(lga_width(2));
if nvl(p_apvr_id, 0) = 0 then
lg_page_width_standard := lg_page_width_standard * 2;
end if;
htp.p('<!-- page width = '||lg_page_width_standard||'-->');
for i in 3..lga_width.count loop
lg_page_width_standard := lg_page_width_standard + to_number(lga_width(i));
htp.p('<!-- page width = '||lg_page_width_standard||'-->');
end loop;
lg_page_width := to_char(lg_page_width_standard);
else
lga_width(1) := '15%';
lga_width(2) := '8%';
lga_width(3) := '9%';
lga_width(4) := '9%';
lga_width(5) := '9%';
lga_width(6) := '9%';
lga_width(7) := '9%';
lga_width(8) := '9%';
end if;
sub_DETAIL_PAGE_HD(p_apvr_id);
end if;
/* cursor loop */
for p in people_cur(p_rpt_from_dt, p_rpt_to_dt) loop
/* is/was this person assigned to the selected approver for the report period */
v_display_fl := FALSE;
if nvl(p_tcs_user_id, 0) > 0 then
if p_tcs_user_id = p.tcs_user_id then
htp.p('<br>Selected User');
v_display_fl := TRUE;
end if;
elsif nvl(p_apvr_id, 0) = 0 then
if nvl(p_apvr_id, 0) = 0 then
v_display_fl := TRUE;
elsif p_apvr_id > 0 or p_apvr_id = -1 then
v_display_fl := fct_ASSIGNED_APVR(p.tcs_user_id, p_apvr_id, p_rpt_from_dt, p_rpt_to_dt);
end if;
if v_display_fl then
v_people_cnt := v_people_cnt + 1;
lg_tcs_owner_info.USER_ID := p.tcs_user_id;
lg_tcs_owner_info.PAY_ID := p.pay_id;
lg_tcs_owner_info.PAY_TYPE := p.pay_typ;
lg_tcs_owner_info.SYS_STRT_DT := p.sys_strt_dt;
lg_tcs_owner_info.TERM_DT := p.sys_end_dt;
if p.pay_typ = 'S' then
begin
select wrk_hire_dt
into lg_tcs_owner_info.hire_dt
from subcntr
where sub_id = p.pay_id;
exception
when no_data_found then
tc_debug.html_message('subcntr.pay_id('||p.pay_id||')');
end;
else
select
wrk_hire_dt,
decode(bend_empl_fl, 'Y', 'E', 'W')
into
lg_tcs_owner_info.hire_dt,
lg_tcs_owner_info.pay_type
from empl
where empl_id = lg_tcs_owner_info.PAY_ID;
end if;
if lga_report_out.count = 0 then
lga_report_out(lga_report_out.count+1) := '<table border="1" cellpadding="3" width="'||lg_page_width||'">';
end if;
if mod(v_people_cnt,2) = 1 then
lga_report_out(lga_report_out.count+1) := ('<tr bgcolor="'||lg_odd_bgcolor||'">');
else
lga_report_out(lga_report_out.count+1) := ('<tr bgcolor="'||lg_even_bgcolor||'">');
end if;
lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>'||p.name||'</font></td >');
lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>'||p.pay_typ||'-'||lpad(p.pay_id,4,'0')||'</font></td >');
if nvl(p_apvr_id, 0) > 0 then /* Single Approver */
/* need approver ID for time card "status" */
lga_apvr := lga_apvr_null; /* clear the approver id array */
lga_apvr(1).apvr_tcs_id := p_apvr_id;
elsif nvl(p_apvr_id, 0) = 0 then /* ALL Approvers */
lga_apvr := lga_apvr_null; /* clear the approver id array */
v_cnt := 0;
for ap in apvr_cur (p.tcs_user_id) loop
if v_cnt = 0 then
/* most recent approver may not be the applicable approver */
v_cnt := 1;
lga_apvr(v_cnt).apvr_name := ap.apvr_name; -- identify multiple approvers for the "status"
lga_apvr(v_cnt).apvr_tcs_id := ap.fk_tcs_apvr_id; -- identify multiple approvers for the "status"
lga_apvr(v_cnt).apvr_pay_id := ap.apvr_pay_id; -- identify multiple approvers for the "status"
v_apvr_id := ap.fk_tcs_apvr_id;
if ap.apvr_pay_typ = 'S' then
lga_apvr(v_cnt).apvr_pay_typ := ap.apvr_pay_typ; -- identify multiple approvers for the "status"
else
select decode(bend_empl_fl, 'Y', 'E', 'W')
into lga_apvr(1).apvr_pay_typ
from empl
where empl_id = lga_apvr(1).apvr_pay_id;
end if;
end if;
if ap.strt_dt <= p_rpt_to_dt and nvl(ap.end_dt, p_rpt_to_dt) >= p_rpt_from_dt then
/* approver record */
lg_tcs_owner_info.APVR_ID := ap.fk_tcs_apvr_id;
lg_tcs_owner_info.APVR_STRT_DT := ap.strt_dt;
lg_tcs_owner_info.APVR_END_DT := ap.end_dt;
don't enter same approver name multiple times
when same approver has been assigned more than once
Example: approver1, approver_2, approver_1 (change back to approver 1)
for i in 1..lga_apvr.count loop
v_apvr_id := ap.fk_tcs_apvr_id;
if lga_apvr(i).apvr_tcs_id = ap.fk_tcs_apvr_id then
/* don't add again */
v_apvr_id := NULL;
exit;
end if;
end loop;
if v_apvr_id is not NULL then
v_cnt := v_cnt + 1;
lga_apvr(v_cnt).apvr_name := ap.apvr_name; -- identify multiple approvers for the "status"
lga_apvr(v_cnt).apvr_tcs_id := ap.fk_tcs_apvr_id; -- identify multiple approvers for the "status"
lga_apvr(v_cnt).apvr_pay_id := ap.apvr_pay_id; -- identify multiple approvers for the "status"
lga_apvr(v_cnt).apvr_pay_typ := ap.apvr_pay_typ; -- identify multiple approvers for the "status"
end if;
end if;
end loop;
/* list approver pay IDs */
lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>');
if lga_apvr.count = 0 then
lga_report_out(lga_report_out.count+1) := 'Approver Unassigned';
else
for i in 1..lga_apvr.count loop
if i > 1 then
lga_report_out(lga_report_out.count+1) := '<br>';
end if;
lga_report_out(lga_report_out.count+1) := (lga_apvr(i).apvr_name);
end loop;
end if;
lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>');
if lga_apvr.count = 0 then
lga_report_out(lga_report_out.count+1) := 'N/A';
else
for i in 1..lga_apvr.count loop
if i > 1 then
lga_report_out(lga_report_out.count+1) := '<br>';
end if;
lga_report_out(lga_report_out.count+1) := (lga_apvr(i).apvr_pay_typ)||'-'||lpad(lga_apvr(i).apvr_pay_id,4,'0');
end loop;
end if;
lga_report_out(lga_report_out.count+1) := ('</font></td >');
end if;
for t in tc_cur(p.tcs_user_id, p_rpt_from_dt, p_rpt_to_dt) loop
htp.p('<! '||t.strt_dt||', '||t.end_dt||', '||t.stat_cd||' -->');
--lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>');
--lga_report_out(lga_report_out.count+1) := (t.stat_cd);
--lga_report_out(lga_report_out.count+1) := ('</font></td >');
/* has the selected approver has completed processing */
if p_apvr_id > 0
and v_apvr_id = p_apvr_id
and v_a_user_id != p_apvr_id
then
exit;
end if;
for ap in apvr_cur (p.tcs_user_id) loop
if apvr_cur%rowcount = 1 then
/* most recent approver assigned */
lg_tcs_owner_info.apvr_id := ap.fk_tcs_apvr_id;
end if;
if ap.strt_dt <= t.end_dt and nvl(ap.end_dt, t.end_dt) >= t.strt_dt then
/* approver assigned during time card period */
lg_tcs_owner_info.apvr_id := ap.fk_tcs_apvr_id;
exit;
end if;
end loop;
lg_tc_status.strt_dt := t.strt_dt;
lg_tc_status.end_dt := t.end_dt;
lg_tc_status.stat_cd := t.stat_cd;
v_stat_cd := fct_TC_STATUS(nvl(p_apvr_id, 0));
lga_report_out(lga_report_out.count+1) := ('<td align="center" valign="top" bgcolor="'||lg_tc_status.bg_color||'">');
lga_report_out(lga_report_out.count+1) := ('<font size=-2 color='||lg_tc_status.font_color||'>');
lga_report_out(lga_report_out.count+1) := v_stat_cd;
lga_report_out(lga_report_out.count+1) := ('</font></td >');
end loop;
lga_report_out(lga_report_out.count+1) := '</tr>';
end if; /* v_display_fl */
end loop;
if p_rpt_type in ('B', 'S') then
lg_page_cnt := lg_page_cnt + 1;
sub_DISPLAY_STATUS_SUMMARY;
end if;
if lga_report_out.count > 0 then
lga_report_out(lga_report_out.count+1) := '</table>';
end if;
if lga_report_out.count > 0 then
if p_rpt_type = 'B' or p_apvr_id > 0 then
if p_display_hdr then
if lg_page_cnt > 0 then
if p_apvr_id > 0 then /* selected individual approver */
htp.p('</table>');
end if;
htp.p('<br style="page-break-after:always">');
htp.p('<!-- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -->');
htp.p('<!-- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -->');
end if;
lg_page_cnt := lg_page_cnt + 1;
tc_reporting.reports_header
1,
'Time Card Status Report',
'for '||dd_mon_yyyy(p_rpt_from_dt)||' through '||dd_mon_yyyy(p_rpt_to_dt)||'<BR>'||
'Report Date: '||dd_mon_yyyy(lg_sysdate)||' Time: '||v_time_str,
NULL,
NULL,
NULL,
NULL, -- p_backto_pg, /* Backto */
'focus()',
lg_page_cnt
end if;
end if;
if p_rpt_type in ('B', 'D') then
for i in 1..lga_report_out.count loop
htp.p(lga_report_out(i));
end loop;
end if;
end if;
END sub_STATUS_BD_ALPHA;
Some veriable
type report_tc_rec is record
tc_owner_name tc_wkr.d_full_nm_lfm%type,
o_user_id tc_wkr.tc_row_id%type,
o_pay_id varchar2(10),
o_sys_strt_dt date,
o_sys_end_dt date,
tc_apvr_name tc_wkr.d_full_nm_lfm%type,
a_pay_id varchar2(10),
a_user_id tc_wkr.tc_row_id%type,
tc_strt_dt date,
tc_end_dt date,
tc_stat_cd varchar2(50),
ap_strt_dt date,
ap_end_dt date
/* time card owner information */
TYPE tcs_owner_info_rec IS RECORD
USER_ID tc_wkr.tc_row_id%type,
PAY_ID tc_wkr.tcw_id%type,
PAY_TYPE tc_wkr.tcw_typ%type,
HIRE_DT date,
SYS_STRT_DT date,
TERM_DT date,
APVR_ID tc_wkr.tc_row_id%type,
APVR_STRT_DT date,
APVR_END_DT date
/* status code determines report cell font and background colors */
TYPE tc_status_rec IS RECORD
STRT_DT date,
END_DT date,
STAT_CD tc.stat_cd%type,
FONT_COLOR varchar2(16),
BG_COLOR varchar2(16)
/* count of all time card status for report summary */
TYPE tc_status_summary_rec IS RECORD
APPROVED_CNT integer := 0,
REJECTED_CNT integer := 0,
SUBMITTED_CNT integer := 0,
POSTED_CNT integer := 0,
VERIFIED_CNT integer := 0,
OPEN_CNT integer := 0,
NEW_CNT integer := 0,
REQUIRED_CNT integer := 0,
TOTAL_CNT integer := 0
/* determine multiple approvers for individual for selected report period */
TYPE apvr_rec IS RECORD
apvr_name tc_wkr.d_full_nm_lfm%type,
apvr_tcs_id tc_wkr.tc_row_id%type,
apvr_pay_id tc_wkr.tcw_id%type,
apvr_pay_typ tc_wkr.tcw_typ%type
TYPE apvr_id_array_table IS TABLE OF apvr_rec
index by binary_integer;
type output_array is table of varchar2(1000)
index by binary_integer;
type date_array is table of date
index by binary_integer;
type status_array is table of varchar2(1000)
index by binary_integer;
type apvr_array is table of number(8)
index by binary_integer;
lga_report_out output_array; /* array of HTML code to be output to browser */
lga_report_out_null output_array; /* null array of HTML code */
lga_tc_status status_array;
lga_null_status status_array;
lga_tc_strt_dt date_array;
lga_tc_end_dt date_array;
lga_tc_disp date_array; /* start dates of displayed TC for selected user */
lga_null_date date_array; /* null array used to clear other date arrays */
/* LOCAL GLOBAL VARIABLES */
lg_tcs_owner_info tcs_owner_info_rec; /* time card owner information */
lg_tc_status tc_status_rec; /* time card status information */
lg_tc_status_summary tc_status_summary_rec; /* time card count by status */
lg_tc_rec report_tc_rec; /* time card */
lga_apvr apvr_id_array_table; /* array of approver Names and Payroll IDs */
lga_apvr_null apvr_id_array_table; /* clear the lga_apvr array for each user */
lg_sysdate date := sysdate;
lg_debug_fl boolean := FALSE;
lg_debug_owner_id tc_wkr.tc_row_id%type := 9905;
lg_debug_apvr_id tc_wkr.tc_row_id%type := 1000;
The chnages i have done its in bold
Please Advice
Thanks
Edited by: Purvik on Aug 25, 2009 11:59 AMThere is not a chance in the world, especially not knowing column definitions that I, and I suspect most anyone else, is going to wade through this much unformated code looking for an error you couldn't bother to copy in full.
Either tell us, specifically, the line on which the error is occurring or, better yet, start whacking stuff out of your code until you find the offending definition. That is certainly what I would do. Commenting out sections is a marvelous way to quickly find an issue.
Before you post again please read the FAQ. It will explain to you how to properly post and use the tags. -
ORA- 06502: PL/SQL: numeric or value error: character string buffer too sma
Hi Everybody,
Please, I Need of Your Help.
We have a table with the following characteristics:
PS_NAMES ( EMPLID VARCHAR2(33), NAME VARCHAR2(150), ... )
In this table a Trigger exists...
CREATE OR REPLACE TRIGGER TG_NAMES
BEFORE UPDATE ON PS_NAMES
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
Declare
vemplid ps_names.emplid%type;
vname ps_names.name%type;
Begin
vname := substr(:new.name,1,45);
end;
When the register is updated and the field PS_NAMES.NAMES has a bigger or equal content that 45 characters and with a character special, happen the error: "ORA- 06502: PL/SQL: numeric or value error: character string buffer too small".
This happens for any bigger or equal name the 45 characters and that it contains a character special.
Thanks,
Márcio Ap. Silveirapaddy wrote:
Hi,
I have check that part. The out parameter is getting populated correctly. I tried even removing the out parameter. Still it failed.And still you haven't provided all the details.
What about col1, col2, and the actual definition/declaration for ot_MY_OBJECT_TYPE?
How can we see any of the datatypes and where the issue could be if you don't bother to supply us with the information. Our crystal balls are broken and in the shop for fixing at the minute. -
Hi there...
I'm sugin 9Iasv2 Portal.
When i clik on the "approbations" tab in the parameters of a page, i always get this error :
Erreur : ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Could you please help me ?
regards
ArnaudPlease report this problem to Oracle Support.
-
Hello,
I am getting this error when i am trying to execute a PL/SQL script using an Oracle API
We are using Oracle 10g release 2 database. I am getting this error only on some instances. This script is running fine in Development instances.
Script:
SET VERIFY OFF;
SET serveroutput on size 100000;
SET linesize 300;
EXEC FND_STATS.GATHER_COLUMN_STATS ('AR', 'HZ_LOCATIONS', 'COUNTRY');
SELECT
hl.location_id,hl.state, hl.country,
hcasa.org_id
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';
--PROMPT Dropping Table pmr13286_temptable
DROP TABLE pmr13286_temptable;
CREATE TABLE pmr13286_temptable AS (SELECT
hp.attribute_category , hl.address_lines_phonetic,
hps.party_site_number,hca.cust_account_id,
hcsua.site_use_code, hcsua.primary_flag, hcsua.status,
hl.address1, hl.address2, hl.address3, hl.address4,
hl.city, hl.state, hl.postal_code, hl.country,
hl.county, hl.province, hcasa.org_id,
hl.creation_date
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%');
DECLARE
l_location_rec hz_location_v2pub.location_rec_type;
l_object_version_number hz_locations.object_version_number%TYPE;
p_status_code NUMBER;
l_api_status VARCHAR2 (2000);
l_msg_count NUMBER (15);
l_msg_data VARCHAR2 (2000);
v_total_count NUMBER (15);
v_prvi_count NUMBER (15);
v_countr_count NUMBER (15);
v_null_count NUMBER (15);
v_rem_recs NUMBER (15);
v_status_code VARCHAR2 (2000);
l_sql_errmsg VARCHAR2 (500);
CURSOR c_cust_addr
IS
SELECT
hl.*
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';
BEGIN
v_total_count := 0;
v_prvi_count := 0;
v_countr_count := 0;
v_null_count := 0;
dbms_output.put_line('Total Count'||v_total_count );
dbms_output.put_line('PR/VI Conversion Count'||v_prvi_count );
dbms_output.put_line('PR/VI to US Conversion Count'||v_countr_count );
dbms_output.put_line('Non US/CA State Null Count'||v_null_count );
FOR i IN c_cust_addr
LOOP
l_location_rec := NULL;
v_total_count := v_total_count + 1;
l_location_rec.location_id := i.location_id;
l_location_rec.state := i.state;
l_location_rec.country := i.country;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
BEGIN
SELECT hl.object_version_number
INTO l_object_version_number
FROM hz_locations hl
WHERE hl.location_id = l_location_rec.location_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
raise_application_error (
-20059,
'object_version_number not found for location = '
|| TO_CHAR (l_location_rec.location_id)
END;
Update 1 - Update Addresses of 3 records that have wrong country names
BEGIN
IF (l_location_rec.location_id IN (1436720,119456,604649)) THEN
dbms_output.put_line(' 3 records Location_id '||l_location_rec.location_id);
IF ( l_location_rec.location_id = 1436720) THEN
l_location_rec.state := 'OH';
l_location_rec.country := 'US';
ELSIF ( l_location_rec.location_id = 119456) THEN
l_location_rec.country := 'US';
ELSIF ( l_location_rec.location_id = 604649) THEN
l_location_rec.country := 'PK';
END IF;
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
END IF;
END;
Update 2 - Update state to 'VI','PR' where country is in 'VI','PR'
BEGIN
IF (i.country = 'PR' AND (i.state <> 'PR' OR i.state IS NULL))
OR (i.country = 'VI' AND (i.state <> 'VI'OR i.state IS NULL)) THEN
v_prvi_count := v_prvi_count + 1;
dbms_output.put_line(' State to PR/VI Location_id '||l_location_rec.location_id);
SELECT DECODE (i.country,'PR','PR','VI', 'VI') INTO l_location_rec.state
FROM apps.hz_locations WHERE
location_id = l_location_rec.location_id;
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
END IF;
END;
Update 3 - Update Country code to 'US' where state code is either 'PR' or 'VI'
BEGIN
IF l_location_rec.state = 'PR' OR l_location_rec.state = 'VI'
THEN l_location_rec.country := 'US';
v_countr_count := v_countr_count + 1;
dbms_output.put_line('PR/VI country to US Location_id '||l_location_rec.location_id);
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
END IF;
END;
Update 4 - Update state code to NULL where state code is NOT NULL and country code is not in US or CA
IF l_location_rec.country NOT IN ('US','CA') AND l_location_rec.state IS NOT null
THEN l_location_rec.state := FND_API.G_NULL_CHAR;
v_null_count := v_null_count + 1;
dbms_output.put_line('Non US/CA to Null Location_id '||l_location_rec.location_id);
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
END IF;
END LOOP;
v_countr_count := v_countr_count +2;
dbms_output.put_line('Total Count'||v_total_count );
dbms_output.put_line('PR/VI Conversion Count'||v_prvi_count );
dbms_output.put_line('PR/VI to US Conversion Count'||v_countr_count );
dbms_output.put_line('Non US/CA State Null Count'||v_null_count );
BEGIN
SELECT
count(*) into v_rem_recs
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';
dbms_output.put_line('remaining count '||v_rem_recs );
END;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error in Program: ' ||' Error Message ' || SQLERRM);
ROLLBACK;
END;
SELECT
hl.location_id,hl.state, hl.country,
hcasa.org_id
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';You may want to zero in on the part of the code that throws this error.
(i)
Try executing a small part of your code, while commenting out the rest. If that is successful, execute a slightly bigger part of the code, and so on successively. Once you know, where exactly the code is failing, it should be easier to create a small testcase against your data and investigate the problem.
(ii)
Check those local variables and the values that get assigned to them. It is a good practice to anchor local variables to database columns. That way, there will be less surprises when the table structures are altered.
(iii)
The script as such does not show any glaring error, but you may want to check those procedure calls e.g. -
hz_Location_v2Pub.Update_Location(fnd_aPi.g_True,l_Location_rec,l_Object_Version_Number,
l_aPi_Status,l_msg_Count,l_msg_Data);It's quite possible that the procedure is assigning a value to an output parameter that is too small to store that.
Note that, given such a huge script and not knowing your database, we are not particularly inclined to debug it. The only person who can make things easier for himself/herself is you.
HTH,
isotope -
Ora-06502:pl/sql :numeric or value error:host bind array too small
declare
v_dr_narrative varchar2(1000);
begin
v_dr_narrative:=f_gen_acct_narration_test(fiv_module=>'C' ,
fiv_handoff_type=>'T',
fiv_acct_freq=>NULL ,
fiv_acct_type =>NULL ,
fiv_acct_name=>NULL ,
fiv_acct_level=>'I',
fiv_applicable_for=>NULL,
fiv_client_code =>NULL ,
fiv_product_code=>NULL ,
fiv_account_nmbr=>NULL ,
fiv_pir_dep_acct_nmbr =>NULL ,
fiv_pir_dep_acct_int_nmbr=> NULL);
v_dr_narrative:=f_gen_acct_narration_wrapper(fiv_module=>'C' ,
fiv_handoff_type=>'T',
fiv_acct_freq=>NULL ,
fiv_acct_type =>NULL ,
fiv_acct_name=>NULL ,
fiv_acct_level=>'I',
fiv_applicable_for=>NULL,
fiv_client_code =>NULL ,
fiv_product_code=>NULL ,
fiv_account_nmbr=>NULL ,
fiv_pir_dep_acct_nmbr =>NULL ,
fiv_pir_dep_acct_int_nmbr=> NULL,
fiv_event_code=>'DATAENTRY',
fiv_source_of_entry=>'T',
fiv_transaction_journal_nmbr=>'11031800007V',
fiv_seq_nmbr=>'001' ,
fiv_entity_type=>'CLIENT' ,
fiv_txn_reference_type=>'D' ,
fiv_txn_reference_nmbr=>'11031800002L');
dbms_output.put_line(v_dr_narrative);
end;Do you have a question?
SQL> declare
2 v_dr_narrative varchar2(1000);
3 begin
4
5 v_dr_narrative:=f_gen_acct_narration_test(fiv_module=>'C' ,
6 fiv_handoff_type=>'T',
7 fiv_acct_freq=>NULL ,
8 fiv_acct_type =>NULL ,
9 fiv_acct_name=>NULL ,
10 fiv_acct_level=>'I',
11 fiv_applicable_for=>NULL,
12 fiv_client_code =>NULL ,
13 fiv_product_code=>NULL ,
14 fiv_account_nmbr=>NULL ,
15 fiv_pir_dep_acct_nmbr =>NULL ,
16 fiv_pir_dep_acct_int_nmbr=> NULL);
17
18 /*
19 v_dr_narrative:=f_gen_acct_narration_wrapper(fiv_module=>'C' ,
20 fiv_handoff_type=>'T',
21 fiv_acct_freq=>NULL ,
22 fiv_acct_type =>NULL ,
23 fiv_acct_name=>NULL ,
24 fiv_acct_level=>'I',
25 fiv_applicable_for=>NULL,
26 fiv_client_code =>NULL ,
27 fiv_product_code=>NULL ,
28 fiv_account_nmbr=>NULL ,
29 fiv_pir_dep_acct_nmbr =>NULL ,
30 fiv_pir_dep_acct_int_nmbr=> NULL,
31 fiv_event_code=>'DATAENTRY',
32 fiv_source_of_entry=>'T',
33 fiv_transaction_journal_nmbr=>'11031800007V',
34 fiv_seq_nmbr=>'001' ,
35 fiv_entity_type=>'CLIENT' ,
36 fiv_txn_reference_type=>'D' ,
37 fiv_txn_reference_nmbr=>'11031800002L');
38 */
39
40 dbms_output.put_line(v_dr_narrative);
41
42 end;
43
44
45
46
47
48 /
v_dr_narrative:=f_gen_acct_narration_test(fiv_module=>'C' ,
ERROR at line 5:
ORA-06550: line 5, column 17:
PLS-00201: identifier 'F_GEN_ACCT_NARRATION_TEST' must be declared
ORA-06550: line 5, column 1:
PL/SQL: Statement ignoredBecause you've not supplied the code that anyone would need to reproduce the error in the subject of your post. -
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I am encountering this 6502 error when running a report in Crystal Reports XI. I am connecting to Oracle Server. All the documentation I've read has said to update the UserSessionFormat property... how do I do that?
Thanks in advance!Hi Grant,
UserSessionFormat is a property in the Oracle OleDB driver.
Scroll to the Solution part of tis article.
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2012/01/20/every-bug-is-a-microsoft-bug-until-proven-otherwise.aspx
Good luck,
Brian -
I have a form which uses a customer form/report, drop downs etc..
the debug shows it running this statement
...Execute Statement: begin begin SELECT distinct initcap(RTRIM (LTRIM (e.surname, ' *0123456789-/:.?,'), ' *0123456789-/:.?,') || ', ' || RTRIM (LTRIM (e.first_name, ' *0123456789-/:.?,'), ' *0123456789-/:.?,' )) empname, e.ID bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value FROM dms.dms_employees@dmsprd e, dms.dms_employee_contracts@dmsprd ec WHERE e.ID = ec.emp_id and e.surname like '%%' AND :p75_date BETWEEN ec.start_date AND NVL (ec.end_date, :p75_date) AND e.brh_id = 3654 ORDER BY 1; end; end;
Then says
"report error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small"
Any Ideas?
Thanks
DeanDenes Kubicek wrote:
A select list is limited in size. I am not sure what the limit is but that is definitelly the case.The maximum size for the HTML generated for a select list is 32K.
86 options sounds on the low side to be hitting that limit, but there are other concerns to this as well. Scrolling through hundreds/thousands of options in a select list is a pain for users, and huge select lists produce bloated pages that impact load times and network bandwidth. That list of around 200 countries you find on many sites is about the sensible maximum length for a select list.
You should use popups.Indeed. -
We face the above error in HTMLDB (APEX) application Ver 3.1.0. This occurs when we try to display more number of rows/records in drop-down list (LOV in tabular forms). We are able to display 200 records in LOV. When the list of records exceeds 230, we face the below error
report error:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
the values listed in LOV are from tables (one of the columns in table)
Could anyone give us a solution?Hi
As you are using a tabular form, you could actually do the following:
1 - In the tabular form column's attributes, set the following:
Display as: Select List (query based on LOV)
Display extra values: Yes
List of values definition: SELECT null d, null r FROM DUAL
2 - Add a new page item and set it to generate your select list
3 - Create an HTML region with no template and use the following for its source:
<script type="text/javascript">
function loadList(c, l)
var s = document.getElementsByName(c);
var lItem = document.getElementById(l);
var lLength = lItem.options.length;
var k;
var j;
var x = lItem.innerHTML;
var v;
var o;
var z;
for (k = 0; k < s.length; k++)
z = s[k];
v = z.value;
z.options.length = 0;
for (j = 0; j < lLength; j++)
o = new Option()
o.value = lItem[j].value;
o.text = lItem[j].text;
z.options[j] = o;
z.value = v;
if (z.selectedIndex == -1)
z.selectedIndex = 0;
loadList("f05", "P1_MGR");
</script>
(Change "f05" and "P1_MGR" as appropriate to your column and your new page item respectively)
Now, when you load the page, the select list contains a null entry plus the entry already on the database. The javascript kicks in automatically, loops through every entry in the "f05" column, copies the existing value, replaces the select list with the new page item version and sets its value to the copied value.
Your new page item could be in a DIV tag that has a style of "display:none" to hide it from view.
Andy -
SQL Report query ORA-06502: PL/SQL: numeric or value error: character strin
Hello,
I have saved below query in the sql scripts, which executes good under SQL Developer,
select "RVV"."RLNUM" as "RLNUM",
"GVREB"."RLNUM" as "RLNUM",
"TVV"."RLNUM" as "RLNUM_1",
"Regulation"."CODE" as "CODE",
"Regulation"."NAAM" as "NAAM",
"GVREB"."BRONCODE" as "BRONCODE",
sum(RVV.RVV_MODULATIE) as "RVV_MODULATIE",
sum(RVV.RVV_EXTRA_MODUL) as "RVV_EXTRA_MODUL",
sum(GVREB.PMB) as "PMB",
sum(GVREB.VVM) as "VVM",
sum(GVREB.VVEM) as "VVEM",
"GVREB"."STATUS" as "STATUS",
sum(TVV.VVM) as "VVM",
sum(TVV.VVEM) as "VVEM",
"Regulation"."version" as "version",
"TVV"."Appyear" as "Appyear"
from "GVREB" "GVREB",
"RVV" "RVV",
"TVV" "TVV",
"Regulation" "Regulation"
where "RVV"."RLNUM" = :P17_Relationnum
and "GVREB"."RLNUM" = "RVV"."RLNUM"
and "TVV"."RLNUM" = "GVREB"."RLNUM"
and "GVREB"."CODE" = "TVV"."RegulationSCODE"
and "Regulation"."CODE" = "GVREB"."CODE"
and "GVREB"."STATUS" = 'VWT'
and "TVV"."Appyear" = 2009
group by RVV.RLNUM, GVREB.RLNUM, TVV.RLNUM, Regulation.CODE, Regulation.NAAM, GVREB.BRONCODE, GVREB.STATUS, Regulation.version, TVV.Appyear
order by Regulation.version ASC
however when tried to put in the region -> query builder it gives below error,
italics ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Return to application.+italics+
Kindly suggest me work around this error.
Cheers,
G1R15|-|
Edited by: G on Jul 11, 2010 10:03 PMHi,
I was able to resolve the issue. I changed it to = To_Number while assigning.
and for other issue, earlier I choose "Select List" for drop down. I changed this to "Select list with Submit". for the issue of "depending on this values in the report should get change"
Thanks for your support,
Girish -
Ora-06502 pl/sql numeric or value error in Report Query in oracle apex
Hello all,
I need your help...
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I am using bi publisher to generate PDF reports in oracle apex.
We were using APEX 4.0 and migrated to 4.2 just a week ago.
Now we have apex 4.2.
When I try to Create report query,
Shared Components >> Report Queries then create.
and test a report in a create wizard I am getting a error "ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
I have also applied a patch "16760897".
This issue is because of number of columns in a query is more then 26.
If I run a report with 26 or less number of columns then the is working fine, otherwise getting this error.
My before migration report queries working perfectly even now, but not new queries.
This issue is also in apex.oracle.com.
You can see
Not working - http://apex.oracle.com/pls/apex/f?p=619:4
Working - http://apex.oracle.com/pls/apex/f?p=619:2:
Please give a solution.
Thanks you.check the DB version compatibility with apex 4 or your DB version to apex 4.0 support for upgrade!
Oracle Application Express Installation Requirements for 4.0 -
-6502 ORA-06502: PL/SQL: numeric or value error when using 'Create CAPI Definition'
I get an error when I try to create a CAPI definition with Headstart untilities (6i). I use HSU_CAPI revision 6.5.2.0
The detailed information says the following:
Message
BLAPI.OPEN_ACTIVITY
Start HSU_CAPI.run
Number of Tables to create CAPI for 1
Initial checks for table KCS_TENDERS with id 692754610572409851363604771392473242
HSU_CAPT.initial_checks for table KCS_TENDERS
HSU_CAPF.initial_checks for table KCS_TENDERS
HSU_CAPC.initial_checks Custom Services for table KCS_TENDERS
HSU_CAPB.initial_checks BRDD for table KCS_TENDERS
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDIPLS
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
KCS_TENDERS Business Rule Design Definition BR_TNR001_CEV does not have any Trigger Columns. Rule will fire when any column is updated.
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDIPLS
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
Creating CAPI for table KCS_TENDERS with id 692754610572409851363604771392473242
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Insert-stmt, Open transaction.
Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Update-stmt, Open transaction.
Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-stmt, Open transaction.
Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Insert-stmt, Close transaction.
Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Update-stmt, Close transaction.
Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Delete-stmt, Close transaction.
Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-row, Save old data.
Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCODE number of text lines = 404 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Insert, Call CAPI.
Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCODE number of text lines = 4 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Update, Call CAPI.
Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCODE number of text lines = 4 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Delete, Call CAPI.
Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCODE number of text lines = 17 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Insert, Call CAPI.
Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCODE number of text lines = 7 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Update, Call CAPI.
Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCODE number of text lines = 144 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Delete, Call CAPI.
Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCODE number of text lines = 282 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
HSU_CAPF.create_or_find_capi_pack
hsu_capi.find_plm (kcs_tnr_capi, 692754610572409851363604771392473242, CAPI).
capi package found in the context folder
BLPLM.UPD
FREE_FORMAT_TEXT_FLAG......... = Y
IMPLEMENTATION_NAME........... = kcs_tnr_capi
PLSQL_MODULE_TYPE............. = PACKAGE
SCOPE......................... = PUBLIC
COMPLETION_STATUS............. = COMPLETED
NAME.......................... = kcs_tnr_capi
PURPOSE....................... = Custom API package for implementing Business Rules and supporting TAPI
Recreated Package KCS/ KCS_TNR_CAPI, preserving only the Revision History.
HSU_CAPF.add_tags_er_av
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
HSU_CAPF.create_specification
HSU_CAPF.create_c_tabalias
HSU_CAPF.create_c_tabalias_all
HSU_CAPF.create_aggregate_value
HSU_CAPF.create_aggregate_value
HSU_CAPF.create_aggregate_value
Activity aborted with ORACLE internal errors.
-6502 ORA-06502: PL/SQL: numeric or value error: character string buffer too small
What can I do about it???
Thanks in advance.
Menno HoogsteenWorking on the same project as Menno, I had the time to look into the problem.
The problem is caused by the creation of the capi-function agregate_char_value in the packages hsu_capf. While creating this function the following code is executed:
add(' -- allowable values:');
add(' -- '||l_col_name_list);
This last statement causes the problem because this table is very big. L_col_name_list contains 2391 characters wich is 393 characters to long. So i changed this code into:
add(' -- allowable values:');
add(' -- '||substr(l_col_name_list,1,1990));
add(' -- '||substr(l_col_name_list,1990));
and everything works fine. Perhaps something for a patch?
Kind regards,
Ruben Spekle -
i'm getting this error when i try to do the following
6502 = ORA-06502: PL/SQL: numeric or value error: character string buffer too small
declare
str1Query varchar2(32767);
str2Query varchar2(32767);
str3Query varchar2(32767);
str31Query varchar2(32767);
str32Query varchar2(32767);
str4Query varchar2(32767);
desc_t dbms_sql.desc_tab2;
l_col_cnt integer;
colvalue varchar(32676);
cur_rows number;
repCursor integer;
begin
repCursor := dbms_sql.open_cursor;
dbms_sql.parse(repCursor,str1Query || ' ' || str2Query || ' ' || str3Query || ' ' || str31Query || ' ' || str32Query || str4Query,dbms_sql.native);
dbms_sql.describe_columns2( repCursor, l_col_cnt, desc_t );
DBMS_SQL.CLOSE_CURSOR (repCursor);
end;
if there is any ideas about what is wrongThat is not the PL/SQL block that you have run to get that error, right?
What are the sizes of the individual variables - str1Query, str2Query etc...
Whay are there so many variables joined together?
That posted code cannot generate the error you posted:
SQL> declare
2
3 str1Query varchar2(32767);
4 str2Query varchar2(32767);
5 str3Query varchar2(32767);
6 str31Query varchar2(32767);
7 str32Query varchar2(32767);
8 str4Query varchar2(32767);
9 desc_t dbms_sql.desc_tab2;
10 l_col_cnt integer;
11 colvalue varchar(32676);
12 cur_rows number;
13 repCursor integer;
14
15 begin
16
17 repCursor := dbms_sql.open_cursor;
18 dbms_sql.parse(repCursor,str1Query || ' ' || str2Query || ' ' || str3Query || ' ' || str31Query || ' ' || str32Query || str4Query,dbms_sql.native);
19 dbms_sql.describe_columns2( repCursor, l_col_cnt, desc_t );
20 DBMS_SQL.CLOSE_CURSOR (repCursor);
21 end;
22 /
declare
ERROR at line 1:
ORA-00900: invalid SQL statement
ORA-06512: at "SYS.DBMS_SYS_SQL", line 826
ORA-06512: at "SYS.DBMS_SQL", line 39
ORA-06512: at line 18
SQL> -
Difficulty in resolving ORA-06502: PL/SQL: numeric or value error:
Hi
I am having great difficulty to resolve the following error - ORA-06502: PL/SQL: numeric or value error: character string buffer too small . In my Oracle Package, I have a Function that returns a varchar(255).
My Function is basically as follows:
FUNCTION GetUserDept (DeptNum IN NUMBER) RETURN VARCHAR2
IS
deptname varchar(255);
BEGIN
SELECT name INTO deptname
FROM depts
where id = DeptNum;
RETURN deptname
END;
The SQL is running correctly and returns one result, which is what I want. However, when I call the function in my .NET C# code, this is when I am seeing the error message.
In my code, I said that the commandtype is a stored procedure, passed the parameters, and add it to to the parameters, with the return type and direction put first and executed as a scalar. The code executes, and then fails at the ExecuteScalar line, and it is at this point on my exception handler that I see the error message ORA-6502.
This really odd, because I have two other functions that return numbers, and I have executed them in the same way, and theses works!
I have checked my function and can't see what is wrong, and I have tried changing the return type from varchar2 to NVarchar on the return type, but this made no difference.
This problem has really dogged me for hours and I cannot see how to resolve it.
Can someone, please help me?user633278 wrote:
This really odd, because I have two other functions that return numbers, and I have executed them in the same way, and theses works!It is that very reason that your code fails. You need to declare the return variable as a string.
SQL?create or replace
FUNCTION GetUserDept (DeptNum IN NUMBER) RETURN VARCHAR2
IS
deptname varchar(255);
BEGIN
RETURN 'hello world';
END;
2 3 4 5 6 7 8 9 10
Function created.
SQL?
SQL?
declare
x number;
begin
x := GetUserDept(100);
end;
SQL? 2 3 4 5 6 declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 4
SQL?
SQL?
declare
x varchar2(255);
begin
x := GetUserDept(100);
end;
SQL? 2 3 4 5 6
PL/SQL procedure successfully completed. -
ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
I have an HTMLDB report that errors with the above message. The query is over 7000 characters long so I'm guessing this is the cause. If I retrieve the query from a query table, replace the variables in the LONG query using PL/SQL and execute using dynamic SQL, are the HTMLDB reporting features the same as if I was using a simple SQL query? Is there a better way? I will need to 'drill-down' from this report so how do I create the links? The only HTMLDB PL/SQL package I can find mentioned in the User's Guide is HTMLDB_PLSQL_JOB.
Cheers, PaulHello All,
I have the same problem.
For me it started when i got about 500 rows in the table
on which the LOV is based.
With a lot of trying with substr I managed to find the size of the string which it still accepted, which was 51 characters.
So I thought it was some glitch in the APEX insides, and since I had no time to resolve it further, I went on working.
But I have to resolve it now, because the following mysterious behaviour is occurring:
Every few records added to the base table, the problem occurs again, and I can resolve it by cutting down the string
with one character.
I have now reached 39 characters !?
I am afraid that I will end up with 1 character or even null.
If I switch to Popup list based on LOV there's no problem, and the complete strings are shown.
The maximum length of the string in my basetable is 252, but the data in it now reaches 55 at most.
Any idea welcome!
I did already recreate the master-detail form from scratch, but there the same behaviour.
greetings,
Richard Kloostra
Maybe you are looking for
-
When i tried updating my iphone 4 to the latest IOS version 7.1.1 it was updating until the end of the update where it had an icon which said connect to itunes. When i try connecting to itunes on my laptop it still doesnt program, by the way my itune
-
Hello All, I'm having an issue where footage has completely random frames that are completely solid red. I was working with raw MXF wrapped files that are 1080p from a sony F5 so I thought it I might need to transcode. So I transcoded everything to
-
Collection strategy: one customer in multiple company codes
Hi, we look into CM at the moment and have the following requirement: There is one customer who has business with different companies (company codes). the collection for these kind of customer should be based on the customer across all companies and
-
IPhone 5 unable to connect to network
I've just 'Upgraded' to the latest version of iOS and now I can not join my wi-fi at home unless I'm right on top of my router. My wife iPhone 4 connects without problems. Any avice advanced settings would be much appreciated. Thanks.
-
Export to jpeg: Show jpeg file size prior to export
Photoshop save to jpeg dialog box shows the jpeg file size associated with each jpeg compression level (1 - 12). Lightroom export dialog box does not show jpeg file size. Showing the expected jpeg file size is useful when needing to limit file size