EXP-00008, ORA-06502 , ORA-06512 - Export Error
We had done export of schema around 270gb..
exp file=ops4sept.dmp log=ops4sept.log owner='OPS$BBCASHIN' statistics=none buffer=200000000
The following error has come at the end
EXP-00008: ORACLE error 6502 encountered
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 351
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 14
ORA-06512: at line 1
EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.create_exp for object 81203
EXP-00008: ORACLE error 6502 encountered
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 351
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 14
ORA-06512: at line 1
EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.create_exp for object 81202
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.
EXP-00085 The previous problem occurred when calling string.string.string for
object number
Cause: The listed package provides export/import support for procedural
objects, i.e., those whose DDL is supplied by stored procedures. The previously
listed error occurred while calling the specified function.
Action: Contact Oracle Support Services. Most packages are supplied by Oracle
internal cartridge or server development groups. The package name will help
Oracle Support Services determine the correct owner of the problem.
Can you trace the session in order to find out the ORA-01031 problem, which could be a missing grant on a table or system privilege
Similar Messages
-
ORA-06502 nuemeric or value error: character string buffer too small
i am getting above error while doing
ORA-06502 nuemeric or value error: character string buffer too small
ORA-06512 itw_item_add_ch at line 17
plz urgent
CREATE OR REPLACE procedure itw_item_add_ch (header_id1 number, folio out varchar2,tariff out varchar2) as
cursor item_add(header_id1 number) is
SELECT
DISTINCT c.attribute4 item_tariff_no,
c.attribute5 item_folio
FROM OE_ORDER_LINES_ALL b,
mtl_system_items c
WHERE b.flow_status_code not in ('SHIPPED','FULFILLMENT','CLOSED')
and b.inventory_item_id = c.inventory_item_id
and b.ship_from_org_id = c.organization_id
and b.header_id = header_id1;
begin
for item_att in item_add(header_id1) loop
if folio is null then
folio := item_att.item_folio;
else
folio := folio||'/'||item_att.item_folio;
end if;
if tariff is null then
tariff := item_att.item_tariff_no;
else
tariff := tariff||'/'||item_att.item_tariff_no;
end if;
end loop;
end;if you want to find out which of your two variables are causing the problem, then use pragma exception_init along with "begin end exception" blocks within the loop.
I've removed the procedure specification, so you can test this in SQL Plus. You need to supply a number to the Header_id1 variable something like this:
set serveroutput on
begin
header_id1 number := 1; -- supply your own parameter here
cursor Item_Add(Header_Id1 number) is
select
distinct c.Attribute4 Item_Tariff_No
,c.Attribute5 Item_Folio
from Oe_Order_Lines_All b
,MTL_System_Items c
where b.Flow_Status_Code not in ('SHIPPED','FULFILLMENT','CLOSED')
and b.Inventory_Item_Id = c.Inventory_Item_Id
and b.Ship_From_Org_Id = c.Organization_Id
and b.Header_Id = Header_Id1;
exception TOO_MANY_CHARS;
exception TOO_TARIFF_CHARS;
pragma exception_init(TOO_MANY_CHARS, -6502);
l_Folio varchar2(32747);
l_Tariff varchar2(32747);
l_Folio_Continue boolean := true;
l_Tariff_Continue boolean := true;
begin
for Item_Att in Item_Add(Header_Id1) loop
if (l_Folio_Continue) then
begin
if l_Folio is null then
l_Folio := Item_Att.Item_Folio;
else
l_Folio := l_Folio||'/'||Item_Att.Item_Folio;
end if;
exception
when TOO_MANY_CHARS then
dbms_output.put_line ('Foilio has too many values ');
l_Folio_Continue := false;
exit;
end;
end if;
if (l_Tariff_Continue) then
begin
if l_Tariff is null then
l_Tariff := Item_Att.Item_Tariff_No;
else
l_Tariff := l_Tariff||'/'||Item_Att.Item_Tariff_No;
end if;
exception
when TOO_MANY_CHARS then
dbms_output.put_line ('Tariff has too many values ');
l_Tariff_Continue := false;
exit;
end if;
end loop;
end;
/this is untested, so please sort out any compilation errors yourself. -
REP-1401 Fatal PL/SQL error occur ORA-06502 numeric or value error
Hi,
I am getting following error in reports 6i
REP-1401 Fatal PL/SQL error occur ORA-06502 numeric or value error.
I have added a formula column based on other formula column
function CF_1FORMULA0005 return varchar2 is
CF_CREDIT varchar2(38);
begin
:CF_CREDIT:= :D_CARRY_F_CR+:D_HD_SUM_REP_CR;
RETURN (:CF_CREDIT);
end;
Oracle Standard formula coulmn:
function D_CARRY_F_DRFormula return VARCHAR2 is
l_dr VARCHAR2(38);
l_dr_disp VARCHAR2(38);
begin
SRW.REFERENCE(:C_FUNC_CURRENCY);
SRW.REFERENCE(:C_CARRY_F_DR);
if (:C_CARRY_F_DR = 0) THEN
ax_globe_package.g_dr_cf := TRUE;
--l_dr:= '0.00';
l_dr_disp := '0.00';
l_dr := ax_currency_pkg.display_char(:C_FUNC_CURRENCY,l_dr_disp,38);
else
-- return(ax_currency_pkg.display_char(:C_FUNC_CURRENCY,:C_CARRY_F_DR,ax_page_pkg.f_maxlength));
-- Bug2239881. Setting the carried forward totals.
IF (:P_GLOBAL_ATTR_CAT = 'JE.GR.GLXSTBKS.BOOKS' AND ax_globe_package.g_dr_cf = FALSE) THEN
ax_globe_package.g_dr_cf := TRUE;
ax_globe_package.g_dr_total := :C_CARRY_F_DR;
END IF;
srw.message(999,'G_DR_TOTAL = ' || ax_globe_package.g_dr_total );
l_dr := ax_currency_pkg.display_char(:C_FUNC_CURRENCY,to_char(ax_globe_package.g_dr_total),38);
/*select to_number(l_dr, '999G999G999G999G990D00')
into l_dr_disp
from dual;
end if;
srw.message(999,'l_dr = ' || l_dr );
return l_dr;
--return ltrim(to_char(l_dr_disp,'999G999G999G999G990D00','nls_numeric_characters=,.'));
end;
both formula column return types are character.Please help me ASAP.
Thanks,
sriharsha.Hi,
First of all: when you should use concatenation operator (||) instead of plus sign when working with strings. So, instead of
:CF_CREDIT:= :D_CARRY_F_CR+:D_HD_SUM_REP_CR; you should use
:CF_CREDIT:= :D_CARRY_F_CR||:D_HD_SUM_REP_CR; If :D_CARRY_F_CR and :D_HD_SUM_REP_CR are both numbers then consider to use to_char function before you assign value to :CF_CREDIT.
I wonder, why your CF's returns varchar's if they operates on numbers?
regards
kikolus
Edited by: kikolus on 2012-11-30 08:03 -
ORA-06502:Numeric or value error ORA-01403: No data found --6502
Dear All
I am using Forms 10g.
I am calling a report from my form.
but when i am calling then it is showing this error:
ORA-06502:Numeric or value error ORA-01403: No data found --6502
My code is in Print Button :
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
plid ParamList;
vParamValue number;
BEGIN
plid := Get_parameter_List('tmp');
IF NOT Id_Null(plid) THEN
Destroy_parameter_List( plid );
END IF;
plid := Create_parameter_List('tmp');
Add_Parameter(PLid, 'P_Block', Text_Parameter, :block_query.item_block);
Add_Parameter(PLid, 'P_Category', Text_Parameter, :block_query.item_category);
Add_Parameter(PLid, 'P_Dept', Text_Parameter, :block_query.item_dept);
Add_Parameter(PLid, 'P_sub_Category', Text_Parameter, :block_query.item_sub_category);
Add_Parameter(PLid, 'P_FLOOR', Text_Parameter, :block_query.item_floor);
Add_Parameter(PLid, 'P_IP', Text_Parameter, :block_query.item_ip);
Add_Parameter(PLid, 'P_Room', Text_Parameter, :block_query.item_room);
Add_Parameter(PLid, 'P_Userid', Text_Parameter, :block_query.item_usr_id);
Add_Parameter(PLid, 'PARAMFORM', Text_Parameter, 'NO');
repid := FIND_REPORT_OBJECT('rp_report');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER, 'paramform=no');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_oracleapps_eHOpeAS');
v_rep := RUN_REPORT_OBJECT(repid,plid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
END LOOP;
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?
'||'server=rep_oracleapps_eHOpeAS');
Exception
When others then
message(Sqlerrm||'-'||sqlcode);
End;
Edited by: Sandip Mohapatra on Feb 8, 2010 12:44 AMhi
u can write for all no problem.
here is an example please modify it with u r requirements.
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
plid ParamList;
vParamValue number;
BEGIN
plid := Get_parameter_List('tmp');
IF NOT Id_Null(plid) THEN
Destroy_parameter_List( plid );
END IF;
plid := Create_parameter_List('tmp');
add_parameter(plid,'P_code',text_parameter,to_char(:hr.employee_code));
add_parameter(plid,'P_name',text_parameter,to_char(:hr.name));
add_parameter(plid,'P_fname',text_parameter,to_char(:hr.fname));
add_parameter(plid,'P_gender',text_parameter,to_char(:hr.gender));
add_parameter(plid,'P_married',text_parameter,to_char(:hr.marital_status));
add_parameter(plid,'P_job',text_parameter,to_char(:hr.job));
add_parameter(plid,'P_sal',text_parameter,to_char(:hr.sal));
add_parameter(plid,'P_dob',text_parameter,to_char(:hr.dob));
add_parameter(plid,'P_country',text_parameter,to_char(:hr.country));
add_parameter(plid,'P_nationality',text_parameter,to_char(:hr.nationality));
add_parameter(plid,'P_address',text_parameter,to_char(:hr.address));
add_parameter(plid,'p_imagecode',text_parameter,to_char(:images.employee_code));
Add_parameter(plid, 'PARAMFORM', TEXT_parameter, 'NO');
repid := FIND_REPORT_OBJECT('REPORT6');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'NORMAL');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER, 'paramform=no');
v_rep := RUN_REPORT_OBJECT(repid,plid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
END LOOP;
/*Display report in the browser*/
WEB.SHOW_DOCUMENT('http://sarah:8890/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver&P_code='||:hr.employee_code||'&P_name'
||:hr.name ||'&P_fname'|| :hr.fname ||'&P_gender'||:hr.gender||'&P_married'||:hr.marital_status||'&P_job'||:hr.job||'&P_sal'||:hr.sal||'&P_dob'||:hr.dob||
'&p_country'||:hr.country||'&p_natioanlity'||:hr.nationality||'&p_address'||:hr.address||'&p_image'||:images.employee_code||'¶mform=no','_SELF');
END;sarah -
Error ORA-06502, numeric or value error character to number conversion
I have been trying to create an email including data from a table as part of the body. Whenever I try to send it, I get an error ORA-06502, numeric or value error, character to number conversion. If I take out the part referencing the table, the email will go without error, but if I put it back in I get the error.
There is the code:
DECLARE
v_email_body CLOB;
v_from_email_address VARCHAR2(100) := v('APP_USER');
v_id NUMBER;
BEGIN
v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
Date: '||:P14_PURCHASE_DATE||'
Vendor: '||:P14_VENDOR||'
Invoice Number: '||:P14_INVOICE||'
Invoice Date: '||:P14_INVOICE_DT||'
Due Date: '||:P14_INVOICE_DUE_DT||'
KSR Number: '||:P14_KSR||'
DTS PO: '||:P14_DTS_PO||'
FINANCE DO: '||:P14_FINANCE_PO||'
FOR detail IN(SELECT OB_CODE
FROM BUDGET_USED
WHERE P_ID = :P14_ID)
v_email_body := v_email_body||detail.OB_CODE||utl_tcp.crlf;
LOOP
FOR detail2 IN (SELECT ob_code, amount
FROM budget_used
WHERE p_id = :P14_ID)
LOOP
v_email_body := v_email_body||detail2.ELCID||' - '||detail2.AMOUNT||utl_tcp.crlf;
END LOOP;
END LOOP;
v_email_body := v_email_body
'||:P14_EMAIL_NOTES||'
Thanks.
v_id := APEX_MAIL.SEND
(p_to => :P14_SUBMIT_TO
,p_cc => v('APP_USER')
,p_bcc => '[email protected]'
,p_from => v_from_email_address
,p_body => v_email_body
,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
--Having set up your email, now add one (or more) attachments...
FOR c1 in (SELECT FILENAME
,BLOB_CONTENT
,MIME_TYPE
FROM file_subjects f, apex_application_files a
where a.name = f.name
and f.P_ID = :P14_ID) LOOP
IF c1.blob_content IS NOT NULL THEN
APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
END IF;
END LOOP;
END;
Apex_mail.push_queue();
This is important to my company to be able to put this data into an email. If anyone can help me, I would greatly appreciate it. Thank you in advance.Lets isolate the erroring line by running the code in debug mode and adding some debug lines at various stages in the code
Apex has a builtin function named wwv_flow.debug which can print messages to the debug stack and would be visible when the page is run in debug mode.
DECLARE
v_email_body CLOB;
v_from_email_address VARCHAR2(100) := v('APP_USER');
v_id NUMBER;
BEGIN
wwv_flow.debug('BEGIN');
v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
Date: '||:P14_PURCHASE_DATE||'
Vendor: '||:P14_VENDOR||'
Invoice Number: '||:P14_INVOICE||'
Invoice Date: '||:P14_INVOICE_DT||'
Due Date: '||:P14_INVOICE_DUE_DT||'
KSR Number: '||:P14_KSR||'
DTS PO: '||:P14_DTS_PO||'
FINANCE DO: '||:P14_FINANCE_PO||'
'||:P14_EMAIL_NOTES||'
Thanks.
wwv_flow.debug('Before sending mail');
v_id := APEX_MAIL.SEND
(p_to => :P14_SUBMIT_TO
,p_cc => v('APP_USER')
,p_bcc => '[email protected]'
,p_from => v_from_email_address
,p_body => v_email_body
,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
wwv_flow.debug('Before attachements');
--Having set up your email, now add one (or more) attachments...
FOR c1 in
(SELECT FILENAME
,BLOB_CONTENT
,MIME_TYPE
FROM file_subjects f, apex_application_files a
where a.name = f.name
and f.P_ID = :P14_ID)
LOOP
IF c1.blob_content IS NOT NULL THEN
APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
END IF;
END LOOP;
wwv_flow.debug('Finished attachements');
Apex_mail.push_queue();
END;What is the last message you see in the debug after running the page in debug mode and submitting it ? -
Urgent - ORA-06502 numeric or value error in Complex SQL Join
I am having trouble with a tricky bit of code.
I have a complex join query which uses reference cursors.
type search_cursor is ref cursor;
c_result search_cursor;
cursor c_result1 is
select chemicals.*,buildings.building_name,msds.msds,chemical_ras.ra from chemicals,msds,chemical_ras,buildings;
cv_result c_result1%rowtype;
pv_query := 'select chemicals.*,buildings.building_name,msds.msds,chemical_ras.ra from
chem_location_join
right join room_permissions on chem_location_join.room_id = room_permissions.room_id
inner join chemicals on chemicals.chemical_id = chem_location_join.chem_id
inner join cupboards on cupboards.cupboard_id=chem_location_join.cupboard_id
inner join rooms on rooms.room_id=chem_location_join.room_id
inner join buildings on buildings.building_id=chem_location_join.building_id
inner join csr on chemicals.chemical_id=csr.chemical_id
left join msds on msds.csr_id = csr.csr_id
left join chemical_ras on csr.csr_id= chemical_ras.csr_id
where research_group_id = '||pv_research_group_id||' and upper(' || p_search_field || ') LIKE upper(''%' || p_search_entry || '%'') order by chemicals.chemical_name';
Basically,
When the italics are left out, the query runs perfectly. However, when it is put in, it returns the ORA-06502 numeric or value error.
I have run the query in SQL using values in the where clause and it works perfectly. When i replace buildings with other similar elements, i.e. cupboard, room the query returns a similar error.
Sorry if this seems hard to understand, if you need more clarification please reply.
Many Thanks,
Simon
Message was edited by:
SimonHollingsworthno but that shouldn't matter because all that cursor is doing is setting the variable cv_result equal to the same %rowtype, the where clause shouldn't be relevant. in any case I don't have a where clause when the italic bit is left out and it still works fine
-
Error occurred during quick migration: ORA-06502: numeric or value error
I am very beginner on sql developer.I have a problem during a quick migration from mySQL db to Oracle DB as:
step1: captured model processed successful
step2: convered mode processed failed @ ORA-06502: numeric or value error
My work environment:
SQL Developer (2.1.1.64)
Java platform: 1.6.0
Oracle ide:2.1.1
Ojdbc5.jar
Oracle server ver. 9i
mySQL Datatype: datetime (default_value: 0000-00-00 00:00:00) ,float,varchar(100),int(11)
Please help me!
Thanks in advance!
Vien.kgronau wrote:
could you please log into MySQL using mysql-utility, then change to the db (use <your mysql db) and provide the output of
desc bars_eoptHi kgronau,
Thanks for your response. Below is the table "bars_eopt" description from MySQL db. (first row is a description) sorry about the display is not in line as typing.
Field Type Collation Null Key Default Extra Privileges Comment
Bar_Index int(11) NO PRI 0 select,insert,update,references
Recipe varchar(100) latin1_swedish_ci NO MUL select,insert,update,references
Date_Time datetime NO 0000-00-00 00:00:00 select,insert,update,references
ThresholdCurrent float NO 0 select,insert,update,references
SlopeEfficiency float NO 0 select,insert,update,references
Pmax float NO 0 select,insert,update,references
Voltage_at_Imax float NO 0 select,insert,update,references
SeriesResistance float NO 0 select,insert,update,references
PeakWavelength float NO 0 select,insert,update,references
FWHM float NO 0 select,insert,update,references
CentroidWavelength float NO 0 select,insert,update,references
Efficiency_at_Imax float NO 0 select,insert,update,references
ForwardVoltage float NO 0 select,insert,update,references
FW_90_Percent float NO 0 select,insert,update,references
Emitter_at_Ith float NO 0 select,insert,update,references
Emitter_at_Imax float NO 0 select,insert,update,references
Delta_Emitter float NO 0 select,insert,update,references
LOT_ID varchar(100) latin1_swedish_ci NO MUL select,insert,update,references
Part_Number varchar(100) latin1_swedish_ci NO MUL select,insert,update,references
Pak_Number int(11) NO 0 select,insert,update,references
Pak_Position int(11) NO 0 select,insert,update,references
Tracer int(11) NO 0 select,insert,update,references
OCR varchar(100) latin1_swedish_ci NO select,insert,update,references
Inspection_Result varchar(100) latin1_swedish_ci NO select,insert,update,references
Inspection_Defect varchar(100) latin1_swedish_ci NO select,insert,update,references
Facette varchar(1000) latin1_swedish_ci NO select,insert,update,references
Facette2 varchar(1000) latin1_swedish_ci NO select,insert,update,references
Upside varchar(1000) latin1_swedish_ci NO select,insert,update,references
Downside varchar(1000) latin1_swedish_ci NO select,insert,update,references
Thanks again and Best Regards,
Vien.T -
Ora-06502 numeric or value error --urgent
Hai ALL,
In our Application some fields are blank and gives an error 'ora-06502 numeric or value error'. The blanked Fields are taken from another server. Before the error some os booting problem arises and reboot the server. no oracle maintanace and software maintanace done this place. the network connectivity is ok. How the oracle error comes? how to rectify ..please help.. Oracle version is 7..and an urgent matter.
ShijuHi Orashiju,
ORA-06502: PL/SQL: numeric or value error string
Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
For more use this link. I am certain you will get an solution.
http://ora-06502.ora-code.com/
Thanks
Shivank -
ORA-06502/ORA-06512 at execution owa_util.mime_header
Hi, APEX gurus!
I try to write a procedure to display bfile contention /images/ into APEX page.
I have a table :
-TEMP_FLAGS (ID NUMBER(3) NOT NULL, NAME BFILE)
- procedure display_country_flags_bfile
display_country_flags_bfile (p_id NUMBER) is
CURSOR c_flags(p_flag NUMBER) IS
SELECT name
FROM temp_flags_bfile
WHERE id = p_flag;
r_flags c_flags%ROWTYPE;
v_bfile bfile;
lgh_file number;
v_dir_alias varchar2(256);
v_filename varchar2(256);
v_mime varchar2(255);
begin
open c_flags(p_id);
fetch c_flags INTO r_flags;
CLOSE c_flags;
v_bfile := r_flags.name;
dbms_lob.filegetname(v_bfile, v_dir_alias, v_filename);
lgh_file := dbms_lob.getlength(v_bfile);
Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
htp.p('Content-length: '||lgh_file);
htp.p('Content-Disposition: attachment; filename="'||v_filename||'"');
owa_util.http_header_close;
wpg_docload.download_file(v_bfile);
Dbms_Lob.Fileclose(v_bfile);
end display_country_flags_bfile;
If i execute directly in Toad i get error below:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 354
ORA-06512: at "SYS.OWA_UTIL", line 413
ORA-06512: at "STAT.DISPLAY_COUNTRY_FLAGS_BFILE", line 20
ORA-06512: at line 1
In Report attributes of APEX page, i use HTML expression to populate column value as call this procedure with appropriate parameter but image just not showing.
I appreciate any help and opinion.
P.S. I'm a newbie in APEX and have minimal experience.
P.S.2 I forgot - Oracle 10g XE and APEX 2.1 built-in
Thanks, Rado
Edited by: user7637288 on 16-Dec-2008 05:12Thanks, rafix.
But i'm using Oracle XE with storage limit /1GB/ and i don't want store any images in database. I prefer to use bfile type with link to files on OS level.
By the way , just for tests, i try to use blobs on my own table with simular procedure, which throws the same error - with owa_util.mime_header. And think that the problem is related to owa_util package.
My APEX version is 2.1 - built-in in Oracle XE, not 3.1 -
ORA - 06502 NUMERIC OR VALUE ERROR
Hi,
When i try to compile my below code am getting NUMERIC OR VALUE ERROR.
Here is my code :
CREATE OR REPLACE PACKAGE SendMailJPkg AS
-- EOL is used to separate text line in the message body
EOL CONSTANT STRING(2) := CHR(13) || CHR(10);
TYPE ATTACHMENTS_LIST IS TABLE OF VARCHAR2(4000);
-- High-level interface with collections
FUNCTION SendMail(SMTPServerName IN STRING,
Sender IN STRING,
Recipient IN STRING,
CcRecipient IN STRING DEFAULT '',
BccRecipient IN STRING DEFAULT '',
Subject IN STRING DEFAULT '',
Body IN STRING DEFAULT '',
ErrorMessage OUT STRING,
Attachments IN ATTACHMENTS_LIST DEFAULT NULL) RETURN NUMBER;
END SendMailJPkg;
CREATE OR REPLACE PACKAGE BODY SendMailJPkg AS
PROCEDURE ParseAttachment(Attachments IN ATTACHMENTS_LIST,
AttachmentList OUT VARCHAR2) IS
AttachmentSeparator CONSTANT VARCHAR2(12) := '///';
BEGIN
-- Boolean short-circuit is used here
IF Attachments IS NOT NULL AND Attachments.COUNT > 0 THEN
AttachmentList := Attachments(Attachments.FIRST);
-- Scan the collection, skip first element since it has been
-- already processed;
-- accommodate for sparse collections;
FOR I IN Attachments.NEXT(Attachments.FIRST) .. Attachments.LAST LOOP
AttachmentList := AttachmentList || AttachmentSeparator || Attachments(I);
END LOOP;
ELSE
AttachmentList := '';
END IF;
END ParseAttachment;
-- Forward declaration
FUNCTION JSendMail(SMTPServerName IN STRING,
Sender IN STRING,
Recipient IN STRING,
CcRecipient IN STRING,
BccRecipient IN STRING,
Subject IN STRING,
Body IN STRING,
ErrorMessage OUT STRING,
Attachments IN STRING) RETURN NUMBER;
-- High-level interface with collections
FUNCTION SendMail(SMTPServerName IN STRING,
Sender IN STRING,
Recipient IN STRING,
CcRecipient IN STRING,
BccRecipient IN STRING,
Subject IN STRING,
Body IN STRING,
ErrorMessage OUT STRING,
Attachments IN ATTACHMENTS_LIST) RETURN NUMBER IS
AttachmentList VARCHAR2(4000) := '';
AttachmentTypeList VARCHAR2(2000) := '';
BEGIN
ParseAttachment(Attachments,AttachmentList);
RETURN JSendMail(SMTPServerName,
Sender,
Recipient,
CcRecipient,
BccRecipient,
Subject,
Body,
ErrorMessage,
AttachmentList);
END SendMail;
-- JSendMail's body is the java function SendMail.Send()
-- thus, no PL/SQL implementation is needed
FUNCTION JSendMail(SMTPServerName IN STRING,
Sender IN STRING,
Recipient IN STRING,
CcRecipient IN STRING,
BccRecipient IN STRING,
Subject IN STRING,
Body IN STRING,
ErrorMessage OUT STRING,
Attachments IN STRING) RETURN NUMBER IS
LANGUAGE JAVA
NAME 'SendMail.Send(java.lang.String,
java.lang.String,
java.lang.String,
java.lang.String,
java.lang.String,
java.lang.String,
java.lang.String,
java.lang.String[],
java.lang.String) return int';
END SendMailJPkg;
var ErrorMessage VARCHAR2(4000);
var ErrorStatus NUMBER;
-- enable SQL*PLUS output;
SET SERVEROUTPUT ON
-- redirect java output into SQL*PLUS buffer;
exec dbms_java.set_output(5000);
BEGIN
:ErrorStatus := SendMailJPkg.SendMail(
SMTPServerName => 'localhost',
Sender => '[email protected]',
Recipient => '[email protected]',
CcRecipient => '',
BccRecipient => '',
Subject => 'This is the subject line: Test JavaMail',
Body => 'This is the body: Hello, this is a test' ||
SendMailJPkg.EOL || 'that spans 2 lines',
ErrorMessage => :ErrorMessage,
Attachments => SendMailJPkg.ATTACHMENTS_LIST(
'C:\Users\Zahn\Work\sendmail.sql',
'C:\Users\Zahn\Work\ferien-2002.txt'
END;
Can any one please suggest me how to over come this problem ???
Regards,
BharathRaunaq wrote:
This error generally comes , when you try to assign a non-numeric value to a numeric variable
ORA-06502: PL/SQL: numeric or value error Occur's at various instance. The second part of the message exactly stats the reason for this error. Here are few examples.
SQL> declare
2 v number(2);
3 begin
4 v := 123;
5 end;
6 /
declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: number precision too large
ORA-06512: at line 4
SQL> declare
2 v number(2);
3 begin
4 v:= 'a';
5 end;
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> declare
2 v varchar2(1);
3 begin
4 v := 'ab';
5 end;
6 /
declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 4
SQL> -
ORA-06502: numeric or value error: character to number conversion error
I met the following error when I ran Donald's PL/SQL function to_number_or_null. Could somebody here help me find the resolution? Thanks!
SQL> create or replace FUNCTION to_number_or_null (
2 aiv_number in varchar2 )
3 return number is
4 /*
5 to_number_or_null.fun
6 by Donald J. Bales on 12/15/2006
7 An errorless to_number( ) method
8 */
9 begin
10 return to_number(aiv_number);
11 exception
12 when INVALID_NUMBER then
13 return NULL;
14 end to_number_or_null;
15 /
Function created.
SQL> select to_number_or_null('A') from dual;
select to_number_or_null('A') from dual
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "CAROL.TO_NUMBER_OR_NULL", line 10Only INVALID_NUMBER exception is handled and also VALUE_ERROR should be handeled. You can resolve it by handling VALUE_ERROR exception or by adding WHEN OTHERS as I did in following example.
SQL> create or replace FUNCTION to_number_or_null (
2 aiv_number in varchar2 )
3 return number is
4 /*
5 to_number_or_null.fun
6 by Donald J. Bales on 12/15/2006
7 An errorless to_number( ) method
8 */
9 begin
10 return to_number(aiv_number);
11 exception
12 when INVALID_NUMBER then
13 return NULL;
14 when OTHERS then
15 return null;
16 end to_number_or_null;
17 /
Function created.
SQL> select to_number_or_null('A') from dual;
TO_NUMBER_OR_NULL('A')
----------------------With kind regards
Krystian Zieja -
ORA-06502:numeric or value errORA-04088: error during execution of trigger
I received the following error message while entering a number within the maximum value (i.e. 9,999,999.) allowed in a data entry form which is separate from the base form:
ORA-06502: PL/SQL: numeric or value error:number precision too large ORA-06512:at "<Owner>.<Trigger>", line 194 ORA-04088: error during execution of trigger "<Owner>.<Trigger>"
Where <Owner> is the schema name and <Trigger> is the trigger name. The data block of the entry form is based on a database table, and the sum of all values entered (w/ a maximum value of 99,999,999.) is displayed in the base form. A grand total of this sum along w/ other totals on the base form is also displayed w/ a maximum value defined as 999,999,999. I only receive the above error message when the grand total is greater than 99,999,999. If the grand total is less than or equal to 99,999,999, the base form works fine. Why????
I have verified all the attributes for the database columns and form fields and all seems to be okay, and I am running out of my wits. I am desperately in need of your help in resolving this issue soon because pressure is on...
Thanks in advance for any/all the help.Orchid wrote:
I received the following error message while entering a number within the maximum value (i.e. 9,999,999.) allowed in a data entry form which is separate from the base form:
ORA-06502: PL/SQL: numeric or value error:number precision too large ORA-06512:at "<Owner>.<Trigger>", line 194 ORA-04088: error during execution of trigger "<Owner>.<Trigger>"
Where <Owner> is the schema name and <Trigger> is the trigger name. The data block of the entry form is based on a database table, and the sum of all values entered (w/ a maximum value of 99,999,999.) is displayed in the base form. A grand total of this sum along w/ other totals on the base form is also displayed w/ a maximum value defined as 999,999,999. I only receive the above error message when the grand total is greater than 99,999,999. If the grand total is less than or equal to 99,999,999, the base form works fine. Why????
I have verified all the attributes for the database columns and form fields and all seems to be okay, and I am running out of my wits. I am desperately in need of your help in resolving this issue soon because pressure is on...
Thanks in advance for any/all the help.check your associated database column length. It's precision is not able to hold you said value. increase the length by
ALTER TABLE table_name
MODIFY (column_name NUMBER(20) );it's above solution don't work. Then, probably you use variable in the trigger code which hold the vale and it's size is limited. increase it.
added
try this
increase the length of TAB_S_TOT_COST 9 to 18.
and your problem will solved.
Hamid
Edited by: HamidHelal on Feb 13, 2013 10:28 AM -
ORA-06502: numeric or value error: character string buffer too small
I have a stored proc with a parameter pio_med_rec_nbr patient.med_rec_nbr%TYPE
where patient.med_rec_nbr is a varchar2(12) .
character set is we8mswin1252 semantics are bytes
the stored proc retrieves max(med_rec_nbr) into nTmp( number) from a reference table
and does pio_med_rec_nbr := lpad(TO_CHAR(nTmp),12,'0')
which throws the ORA-06502: PL/SQL: numeric or value error: character string buffer too smallwhen I check the length, I get length(pio_med_rec_nbr) = 12
I can pass one digit or null but no more. Any idea what I need to do to debug this? I can do xxtmp := lpad(TO_CHAR(nTmp),12,'0') where xxtmp varchar2(255), so I know the assignments are okay.
Thanks,Do, pio_med_rec_nbr := trim(lpad(TO_CHAR(nTmp),12,'0') )
-
ORA-06502: numeric or value error, please tell me how to assign ...
Dear all people!
my code:
declare
string1 varchar2(300);
string2 varchar2(65);
begin
string1 := ....
string2 := substr(string1,1,60);
end;
when i run program in debug
at command "string2 := substr(string1,1,60);" it raise error ORA-06502;
Please tell me how to assign substr(string1,1,60) to string2 (max length of string2 is 65);
I'm looking to forward to receiving your response!
Thank you very much;Only INVALID_NUMBER exception is handled and also VALUE_ERROR should be handeled. You can resolve it by handling VALUE_ERROR exception or by adding WHEN OTHERS as I did in following example.
SQL> create or replace FUNCTION to_number_or_null (
2 aiv_number in varchar2 )
3 return number is
4 /*
5 to_number_or_null.fun
6 by Donald J. Bales on 12/15/2006
7 An errorless to_number( ) method
8 */
9 begin
10 return to_number(aiv_number);
11 exception
12 when INVALID_NUMBER then
13 return NULL;
14 when OTHERS then
15 return null;
16 end to_number_or_null;
17 /
Function created.
SQL> select to_number_or_null('A') from dual;
TO_NUMBER_OR_NULL('A')
----------------------With kind regards
Krystian Zieja -
ORA-06502 numeric or value error string
Hi,
I have no problem with this code :
select htmldb_item.text(3,nom,20) nom,
htmldb_item.select_list_from_query(9,v_urba_rue.ref_fantoir,'select distinct(nom_voie),v_urba_rue.ref_fantoir from adresse,v_urba_rue where adresse.ref_fantoir(+)=v_urba_rue.ref_fantoir and ref_commune=20 and v_urba_rue.ref_fantoir between 1280 and 1370') rue
from personne,participe,adresse,v_urba_rue
where ...
but when i modify :
...and v_urba_rue.ref_fantoir between 1280 and 1400'') rue...
i have this error :
ORA-06502 PL/SQL: numeric or value error: character string buffer too small
any solution?
thank you very muchHello Zed,
I noticed there are double quotes following the 1400 while in the original query you have the (correct) single quote following the 1370.
Holger ;-)
Maybe you are looking for
-
Hello SAP guru's While I was posting Goods Receipt for Consignment material with movement type 101 it is saying Purchase order has no items. When I check my PO, it is present. I created PO with a material and item category K.
-
Can't sync iPad 2 or iPhone 4 since updating iTunes on Windows 7.
Since upgrading my iPad 2 and my iPhone 4 to iOS 4.3.4 I havebeen unable to properly sync both devices with iTunes 10.4.0.80. I am using Windows 7 Ultimate SP1 64-bit. The issue is when it goes to sync my contacts and calendar with Outlook 2010, it w
-
Bigger brush sizes in Adobe Flash CS5.5
So what my problem is with Adobe Flash CS5.5 is that it only goes up to a certain brush size. I want an even bigger brush sizes. I wish there was an option where you could pick a number and thats how big your brush size would go up to. But it only gi
-
Hi there, Help appreciated in programmatically 'Supporting content types in the gallery and for content types associated with a document library'. Any resources/references or source is greatly appreciated. Regards,
-
Photos disappeared in migration to new Mac
I've learned a lot from reading this already but don't see my specific problem so here goes. My old iBook was dying so several months ago I bought a new one and moved everything over to the new machine using FireWire. However, iPhoto 6.06 on the new