Number conversion error

Hello All,
I have the following code with me:
data:w_s1 type c,
        w_q1_act_rec1(14) type c,
        W_q LIKE EKPO-MENGE.
w_s1 = '-'.
w_q1 = '52,352.900'.
concatenate  w_s1 w_q1 into W_Q1.
condense W_Q1.
W_Q = W_Q1.
when i execute the above code I get the following short dump:
The program attempted to interpret the value "-52,352.900 " as a number, but
since the value contravenes the rules for correct number formats,
this was not possible.
the program is giving me a dump when I am insertinf w_Q1's value to W_Q.
As far as I know W_Q should hold -ve sign.
Please advise.

Hi rajatg ,
pls try changing
w_q1 = '52,352.900'.
with
w_q1 = '52352.900'.
Edited by: gzervas on Dec 13, 2010 3:31 PM

Similar Messages

  • Numeric or value error: character to number conversion error

    I'm having problems inserting a value from a date picker field (DD-MON-YYYY HH MI )
    i'm submitting this value to a packaged procedure that accepts this field as VARCHAR2 .
    on the insert, i do a to_date( P_DATE, 'DD-MON-YYYY HH:MI PM' )
    and i get the numeric conversion error.
    If I change the to_date on the procedure side, I get the :could not read the end of the format mask - which I've found threads about on this site.
    I've tried using HH24 and different formats, but I get one of the two above errors on the insert.
    If I don't fill in the datepicker field at all, it works fine.
    help is appreciated !
    Bill

    Here is the trace anyway:
    *** ACTION NAME:(application 4000, page 1) 2004-09-24 12:58:44.052
    *** MODULE NAME:(HTML DB) 2004-09-24 12:58:44.052
    *** SERVICE NAME:(TOPS) 2004-09-24 12:58:44.052
    *** SESSION ID:(151.1) 2004-09-24 12:58:44.052
    *** 2004-09-24 12:58:44.052
    ksedmp: internal or fatal error
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Current SQL statement for this session:
    declare
    rc__ number;
    begin
    owa.init_cgi_env(:n__,:nm__,:v__);
    htp.HTBUF_LEN := 255;
    null;
    null;
    null;
    null;
    f(p=>:p);
    if (wpg_docload.is_file_download) then
    rc__ := 1;
    wpg_docload.get_download_file(:doc_info);
    null;
    null;
    null;
    commit;
    else
    rc__ := 0;
    null;
    null;
    null;
    commit;
    owa.get_page(:data__,:ndata__);
    end if;
    :rc__ := rc__;
    end;
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    6A3C4A00 532 package body FLOWS_010500.WWV_FLOW_UTILITIES
    6A3C4A00 2502 package body FLOWS_010500.WWV_FLOW_UTILITIES
    6A3C4A00 2748 package body FLOWS_010500.WWV_FLOW_UTILITIES
    6A0E63C8 991 package body FLOWS_010500.WWV_FLOW_FORMS
    6A11675C 932 package body FLOWS_010500.WWV_FLOW_DISP_PAGE_PLUGS
    6A11675C 247 package body FLOWS_010500.WWV_FLOW_DISP_PAGE_PLUGS
    6A4B54E0 8341 package body FLOWS_010500.WWV_FLOW
    6A2A99F0 102 procedure FLOWS_010500.F
    6A2B9E54 10 anonymous block
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    ksedmp+524          CALLrel  ksedst+0 1
    ksedmptracecb+15 CALLrel _ksedmp+0            C
    _ksddoa+118          CALLreg  00000000             C
    ksdpcg+143          CALLrel  ksddoa+0
    ksdpec+180          CALLrel  ksdpcg+0 1966 6D7D208 1
    __PGOSF3__ksfpec+11 CALLrel _ksdpec+0            0
    8
    _kgerev+77           CALLreg  00000000             7474210 1966
    kgerec1+18          CALLrel  kgerev+0 7474210 6DCE5EC 1966 1
    6D7D260
    peirve+465          CALLrel  kgerec1+0
    pevmCVTCN+346 CALLrel _peirve+0           
    pfrinstrCVTCN+36 CALLrel pevmCVTCN+0 6E6E604 71CE370 7160F0C
    pfrrunno_tool+51 CALL??? 00000000
    pfrrun+1834         CALLrel  pfrrun_no_tool+0 6E6E604 6A3C010A 6E6E640
    plsqlrun+1051 CALLrel _pfrrun+0            6E6E604
    peicnt+179          CALLrel  plsql_run+0 6E6E604 1 0
    kkxexe+477          CALLrel  peicnt+0
    opiexe+4896         CALLrel  kkxexe+0 6A2B9E54
    kpoal8+1705         CALLrel  opiexe+0 49 3 6D7E06C
    _opiodr+977          CALLreg  00000000             5E 14 6D7E7CC
    _ttcpip+1827         CALLreg  00000000             5E 14 6D7E7CC 0
    _opitsk+1098         CALL???  00000000            
    opiino+938          CALLrel  opitsk+0 0 0 747ABC0 6DEFB14 D8 0
    _opiodr+977          CALLreg  00000000             3C 4 6D7FBBC
    opidrv+479          CALLrel  opiodr+0 3C 4 6D7FBBC 0
    sou2o+45            CALLrel  opidrv+0 3C 4 6D7FBBC
    opimai+237          CALLrel  sou2o+0
    OracleThreadStart@  CALLrel  opimai+0
    4+899
    77E7D338 CALLreg 00000000

  • Re: Error, numeric or value error: character to number conversion error

    Can someone please please tell me why I'm getting this error and what I'm doing wrong? It looks like a simple error, "numeric or value error: character to number conversion error".
    My code is as follows:
    string connectionString = WebConfigurationManager.ConnectionStrings["DEMO_TEST"].ConnectionString;
    OracleConnection con = new OracleConnection(connectionString);
    OracleCommand cmd = new OracleCommand("DEMO.PKG_LOCATION_TYPE.INS", con);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add(new OracleParameter("@P_DESCRIPTION", OracleDbType.Varchar2, 60));
    cmd.Parameters["@P_DESCRIPTION"].Value = "Test_Description";
    cmd.Parameters.Add(new OracleParameter("@P_NAME", OracleDbType.Varchar2, 6));
    cmd.Parameters["@P_NAME"].Value = "Test_Name";
    cmd.Parameters.Add(new OracleParameter("@P_LOCATION_TYPE_CD", OracleDbType.Decimal, 4));
    cmd.Parameters["@P_LOCATION_TYPE_CD"].Direction = ParameterDirection.InputOutput;
    con.Open();
    try
    cmd.ExecuteNonQuery();
    catch
    //In case of an error
    finally
    con.Close();
    con.Dispose();
    And I recieve the following error block:
    Oracle.DataAccess.Client.OracleException was unhandled by user code
    Message="ORA-06502: PL/SQL: numeric or value error: character to number conversion error\nORA-06512: at line 1"
    Source="Oracle Data Provider for .NET"
    DataSource="demotest"
    Number=6502
    Procedure="DEMO.PKG_LOCATION_TYPE.INS"
    StackTrace:
    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
    at System.Web.UI.WebControls.Wizard.OnFinishButtonClick(WizardNavigationEventArgs e)
    at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e)
    at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args)
    at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ********************************************************

    Are the parameters in your procedure in the same order as they are created in this code? Oracle command works by position unless you change it to be BindByName.
    Failing that you seem to have defined a parameter (P_NAME) to have a length of 6, and are then setting it's value to a string with a length of 9.
    Also the in/output parameter is defined as type decimal. Is this correct? It is defined as InputOutput but you don't assign it any value.
    If these suggestions don't help then perhaps if you post the stored procedure you might get some more ideas.
    HTH
    Lyndon

  • PL/SQL: numeric or value error: character to number conversion error in TRG

    Hi,
    I've got strange issue with one trigger which during update of table reports (DB is 9.2.0.8):
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at "UDR_LOG", line 345
    ORA-04088: error during execution of trigger 'UDR_LOG'but line 345 is:
    END IF;
    so its kind of strange
    the code looks like
    343 IF nvl(to_char(:old.PKD_ID),'''') <> nvl(to_char(:new.PKD_ID),'''') THEN
    344     v_zmn := v_zmn || 'PKD_ID''' || to_char(:old.PKD_ID) || '''' || to_char(:new.PKD_ID) || '''';
    345    END IF;
    so its concatenation not to_number usage .error is triggered by update statement on any column .
    I'm sorry I cant provide You with whole trigger code .
    So if You could only recommend any investigation method that would be great .
    Regards
    Greg

    Hi, Greg,
    When there's an error in a trigger, the line numbers in the error messages are relative to the first DECLARE or BEGIN statement; often, that's a few lines after CREATE OR REPLACE TRIGGER. Post a few lines after what you already posted.
    If you can't find the error, then create another table for testing this, and create a smaller trigger on that table, which does only enough to cause the error. Then you'll be able to post the complete trigger, and the code needed to re-create the problem.

  • 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 10

    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

  • Character to number conversion error during uploading csv

    hi
    I have a question regarding oracle application express.
    I want to upload the csv data to the database using apex application.
    I used a code from otn but it does not work to the number datatype value..
    It gives an error like number to charcter conversion error am not able to resolve it.
    I also use TO_NUMBER functions to convert but it doesn't works..please help me out..
    Following code I used to upload the data:
    DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len number:= 1;
    v_line VARCHAR2 (32767):= NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows number;
    BEGIN
    delete from chktable;
    select blob_content into v_blob_data
    from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER); v_blob_len := dbms_lob.getlength(v_blob_data); v_position := 1; WHILE ( v_position <= v_blob_len ) LOOP v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len; IF v_char = CHR(10) THEN v_line := REPLACE (v_line,',','~'); v_data_array := wwv_flow_utilities.string_to_table (v_line,'~'); EXECUTE IMMEDIATE 'insert into SRS_CC_MI_DATA(OUTAGE,TAR_#,CUSTOMER_NAME,RECEIVED,RESOLUTION_TIME,SEVERITY,PRIORITY)
    values (:1,:2,:3,:4,:5,:6,:7)'
    USING
    v_data_array(1),
    v_data_array(2),
    v_data_array(3),
    v_data_array(4),
    v_data_array(5),
    v_data_array(6),
    v_data_array(7);
    v_line := NULL;
    END IF;
    END LOOP;
    END;
    my table contains:
    "OUTAGE" VARCHAR2(4000),
    "TAR_#" VARCHAR2(4000),
    "CUSTOMER_NAME" VARCHAR2(4000),
    "RECEIVED" VARCHAR2(4000),
    "RESOLUTION_TIME" VARCHAR2(4000),
    "SEVERITY" VARCHAR2(1),
    "PRIORITY" VARCHAR2(4000) NOT NULL ENABLE
    i need to make last two rows number type..
    it works fine if it is varchar2 but not with number type..
    plz help out

    Hello,
    >> "PRIORITY" VARCHAR2(4000) NOT NULL ENABLE
    What is the valid values of this column that you need to use varchar2(4000)? Are you sure this column include valid numbers?
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • ORA-06502 PL/SQLnumeric or value error character to number conversion error

    Hi,
    I have written report in FastReport and I am using "Oracle Provider for OLE DB" for Oracle connection.
    I have seen that my report throws oracle exception in some machines , so I analysed my PL/SQL and saw that problem occurs in "TO_NUMBER" function. (if i remove it exception does not occur)
    However, same report works fine in another machine with the same data (same oracle provider version).
    What can be the problem? What can be the dependence?
    Thanks in advance
    Elshan
    p.s. Oracle provider version is 11.2.0.2.0

    Hi ,
    the reason you are gettin this error is ecause sometimes in your data you are trying to convert a character to a number. When you say it works fine in other machine dos it mean for the same data set or a different data?
    If you thing that you data may conatin a character and you still need to use TO_NUMBer than you should chack the data before converting and if it is a character than you should no do the conversion.
    you can use this link to chek numeris or non numeric
    How to check if a field is numeric?
    thanks
    Edited by: Himanshu Kandpal on Mar 31, 2011 7:55 AM

  • ORA-06502: PL/SQL: numeric or value error: character to number conversion e

    Hi,
    when I do same thing in my procedure it throws below error but it works fine as annonymus block.
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    CREATE TABLE test_table
    (memberid NUMBER,
    trans_date date);
    DECLARE
    v_num number(10,0);
    v_text varchar2(100);
    begin
    v_text := '123456abcdef';
    v_num := substr(v_text,1,5);
    INSERT INTO test_table
    (memberid,
    trans_DATE)
    VALUES
    (v_num,
    sysdate);
    end;Thanks
    Sandhya

    Works fine as a procedure as well;
    SQL> DECLARE
      2  v_num number(10,0);
      3  v_text varchar2(100);
      4  begin
      5  v_text := '123456abcdef';
      6  v_num := substr(v_text,1,5);
      7  INSERT INTO test_table
      8  (memberid,
      9  trans_DATE)
    10  VALUES
    11  (v_num,
    12  sysdate);
    13  end;
    14 
    15  /
    PL/SQL procedure successfully completed.
    SQL> select * from test_table;
      MEMBERID TRANS_DAT
         12345 20-MAY-10
    SQL> create or replace procedure ins_test_table as
      2 
      3    v_num number(10,0);
      4  v_text varchar2(100);
      5  begin
      6  v_text := '123456abcdef';
      7  v_num := substr(v_text,1,5);
      8  INSERT INTO test_table
      9  (memberid,
    10  trans_DATE)
    11  VALUES
    12  (v_num,
    13  sysdate);
    14 
    15  end ins_test_table;
    16  /
    Procedure created.
    SQL>
    SQL> exec ins_test_table;
    PL/SQL procedure successfully completed.
    SQL> select * from test_table;
      MEMBERID TRANS_DAT
         12345 20-MAY-10
         12345 20-MAY-10

  • ORA-06502: PL/SQL: numeric or value error: character to number conversion

    Hello,
    I am new to Oracle Apex so I decided to read and do the tutorials that are on the apex.oracle.com site.
    Now I am at the tutorial 6: How to Work with Check Boxes of the Advanced Tutorials.
    At a certain point you have to add a new radio button.
    At the Item Source Value you have to add SELECT 'Y' FROM DUAL WHERE :P2_LIST_PRICE*0.75=:P2_MIN_PRICE.
    But when I try to create the item, I keep getting the following error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Error creating item.
    Does anybody know what could be the problem.
    Thanks in advance.

    CREATE OR REPLACE PROCEDURE xxbb_query (
    p_branch_code XXBOB_HRMS_APPRAISALS_DATA.Branch_code%TYPE,
    p_PERIOD_NAME XXBOB_HRMS_APPRAISALS_DATA.PERIOD_NAME%TYPE
    IS
    emp_refcur SYS_REFCURSOR;
    v_deposits XXBOB_HRMS_APPRAISALS_DATA.deposits%TYPE :=0;
    v_branch_code XXBOB_HRMS_APPRAISALS_DATA.branch_code%TYPE:=0;
    p_query_string VARCHAR2(500);
    BEGIN
    DBMS_OUTPUT.PUT_LINE('Hello' || ' ' || '...');
    p_query_string := 'SELECT Avg(deposits) Dep,branch_code  FROM XXBOB_HRMS_APPRAISALS_DATA WHERE ' ||
    *' Branch_code = :branch_code '||*
    *' AND PERIOD_NAME = SubStr( :PERIOD_NAME ,1,4))||(SubStr( :PERIOD_NAME ,InStr( :PERIOD_NAME ,'-',1,1)+3,5)) ' ||*
    *' group BY SubStr(PERIOD_NAME,5),BRANCH_CODE ';*
    DBMS_OUTPUT.PUT_LINE('Hi' || ' ' || '...');
    OPEN emp_refcur
    FOR p_query_string USING p_branch_code,v_p_PERIOD_NAME,v_p_PERIOD_NAME,v_p_PERIOD_NAME;
    -- DBMS_OUTPUT.PUT_LINE('----- -------');
    Here I m passing a string variable to pass the select statement for the ref cursor.
    There seems some problem in the substr conversion in the statement.
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    But when i run as a independent staement passing real values in the place of placeholders
    i get the result right.
    The *:PERIOD_NAME* format is *'Jan-2009-10'* .
    And I need to pass the *:PERIOD_NAME* to the query as *'Jan-09-10'*
    Pls suggest.
    Edited by: user7391361 on Jul 23, 2009 8:28 AM

  • 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 ?

  • Error while impdp: ORA-02374: conversion error loading table

    Hi,
    I am trying to convert the character set from WE8ISO8859P1 to AL32UTF8 using expdp/impdp. for this I first convert WE8ISO8859P1 to WE8MSWIN1252 in source DB to get rid of “lossy” data. I created new database(target) with character set AL32UTF8 and nls_length_semantics = ’CHAR’ and created all the tablespaces as in source DB with auoexend on. I took full export (expdp) of source DB excluding TABLESPACE,STATISTICS,INDEX,CONSTRAINT,REF_CONSTRAINT and imported using impdp to target DB. I found below error in the import log file:
    ORA-02374: conversion error loading table "SCTCVT"."SPRADDR_CVT"
    ORA-26093: input data column size (44) exceeds the maximum input size (40)
    ORA-02372: data for row: CONVERT_STREET_LINE1 : 0X'20202020202020202020202020202020202020202020202020'
    I checked with select query on both DBs with below results.
    source DB:
    04:58:42 SQL> select count(*) from "SCTCVT"."SPRADDR_CVT";
    COUNT(*)
    74553
    target DB:
    04:59:24 SQL> select count(*) from "SCTCVT"."SPRADDR_CVT";
    COUNT(*)
    74552
    please suggest me a solution to this.
    Thanks and Regards.
    Edited by: user12045167 on May 9, 2011 10:39 PM

    Thanks for your update maher.
    09:15:53 SQL> desc "SCTCVT"."SPRADDR_CVT"
    Name Null? Type
    SPRADDR_PIDM NUMBER(8)
    CONVERT_PIDM VARCHAR2(9 CHAR)
    SPRADDR_ATYP_CODE VARCHAR2(2 CHAR)
    CONVERT_ATYP_CODE VARCHAR2(2 CHAR)
    SPRADDR_SEQNO NUMBER(2)
    CONVERT_SEQNO VARCHAR2(2 CHAR)
    SPRADDR_FROM_DATE DATE
    CONVERT_FROM_DATE VARCHAR2(8 CHAR)
    SPRADDR_TO_DATE DATE
    CONVERT_TO_DATE VARCHAR2(8 CHAR)
    SPRADDR_STREET_LINE1 VARCHAR2(30 CHAR)
    CONVERT_STREET_LINE1 VARCHAR2(40 CHAR)
    SPRADDR_STREET_LINE2 VARCHAR2(30 CHAR)
    CONVERT_STREET_LINE2 VARCHAR2(40 CHAR)
    SPRADDR_STREET_LINE3 VARCHAR2(30 CHAR)
    CONVERT_STREET_LINE3 VARCHAR2(40 CHAR)
    SPRADDR_CITY VARCHAR2(20 CHAR)
    CONVERT_CITY VARCHAR2(25 CHAR)
    SPRADDR_STAT_CODE VARCHAR2(3 CHAR)
    CONVERT_STAT_CODE VARCHAR2(25 CHAR)
    SPRADDR_ZIP VARCHAR2(10 CHAR)
    CONVERT_ZIP VARCHAR2(15 CHAR)
    SPRADDR_CNTY_CODE VARCHAR2(5 CHAR)
    CONVERT_CNTY_CODE VARCHAR2(5 CHAR)
    SPRADDR_NATN_CODE VARCHAR2(5 CHAR)
    CONVERT_NATN_CODE VARCHAR2(5 CHAR)
    SPRADDR_PHONE_AREA VARCHAR2(3 CHAR)
    CONVERT_PHONE_AREA VARCHAR2(3 CHAR)
    SPRADDR_PHONE_NUMBER VARCHAR2(7 CHAR)
    CONVERT_PHONE_NUMBER VARCHAR2(7 CHAR)
    SPRADDR_PHONE_EXT VARCHAR2(4 CHAR)
    CONVERT_PHONE_EXT VARCHAR2(4 CHAR)
    SPRADDR_STATUS_IND VARCHAR2(1 CHAR)
    CONVERT_STATUS_IND VARCHAR2(1 CHAR)
    SPRADDR_ACTIVITY_DATE DATE
    CONVERT_ACTIVITY_DATE VARCHAR2(8 CHAR)
    SPRADDR_USER VARCHAR2(30 CHAR)
    CONVERT_USER VARCHAR2(30 CHAR)
    SPRADDR_ASRC_CODE VARCHAR2(4 CHAR)
    CONVERT_ASRC_CODE VARCHAR2(4 CHAR)
    SPRADDR_DELIVERY_POINT NUMBER(2)
    CONVERT_DELIVERY_POINT VARCHAR2(2 CHAR)
    SPRADDR_CORRECTION_DIGIT NUMBER(1)
    CONVERT_CORRECTION_DIGIT VARCHAR2(1 CHAR)
    SPRADDR_CARRIER_ROUTE VARCHAR2(4 CHAR)
    CONVERT_CARRIER_ROUTE VARCHAR2(4 CHAR)
    SPRADDR_GST_TAX_ID VARCHAR2(15 CHAR)
    CONVERT_GST_TAX_ID VARCHAR2(15 CHAR)
    SPRADDR_REVIEWED_IND VARCHAR2(1 CHAR)
    CONVERT_REVIEWED_IND VARCHAR2(1 CHAR)
    SPRADDR_REVIEWED_USER VARCHAR2(30 CHAR)
    CONVERT_REVIEWED_USER VARCHAR2(30 CHAR)
    SPRADDR_DATA_ORIGIN VARCHAR2(30 CHAR)
    CONVERT_DATA_ORIGIN VARCHAR2(30 CHAR)
    SPRADDR_CVT_RECORD_ID NUMBER(8)
    SPRADDR_CVT_STATUS VARCHAR2(1 CHAR)
    SPRADDR_CVT_JOB_ID NUMBER(8)
    so here we can see its value is 40 (CONVERT_STREET_LINE1 VARCHAR2(40 CHAR)).
    shall i go ahead altering the column?

  • Quantity Conversion Error in Net Price Calculation

    We are currently using SRM 5.0 ECS where we created a material PO and had a problem with the product not having the language E maintain in the material master. This caused the PO to have status of "error in process"  Once we fixed this issue and tried to reprocess the PO we're not getting the following error message in the Application Monitor:
    No Instance of Object type PurchaseOrder has been created. External Reference
    Puchase Order still contains faulty Items
    Quantity Conversion Error in Net Price Calculation
    Has anyone seen this or know what we can do to resolve this so that the PO gets replicated in R3?
    Thanks in advance.

    Hi Robert,
    Regarding this backend error E 212 06 Quantity conversion error in net
    price calculation.         
    This error is because in the PO Order price unit is empty. And          
    quantity is null. So, please enter the quantity and order price unit          
    for this PO and order the PO again. Or you can retransfer the      
    PO manually using the FM BBP_PD_PO_TRANSFER_EXEC. (for this fm you need       
    to input the PO header guid, which you will get it from tx.BBP_PD             
    by providing PO number and object type as BUS2201).
    This has worked for other customers.
    Hope this helps,
    Kind Regards,
    Matthew

  • Runtime error in J2IUN -  "DYNPRO_FIELD_CONVERSION" / "Conversion Error*"

    Hi All,
    I am facing run time error problem during Transaction J2IUN "DYNPRO_FIELD_CONVERSION" / "Conversion Error"
    Error analysis:
    The program has been interrupted and cannot resume.
    Program "J_1IRUTZN" attempted to display fields on screen 9000.
    An error occurred during the conversion of this data.
    There was a conversion error in the output of fields to the screen.
    The formats of the ABAP output field and the screen field may not match.
    Some field types require more space on the screen than in the ABAP
    program. For example, a date output field on the screen requires two
    more characters than the corresponding field in the ABAP program. When
    the date is displayed on the screen, an error occurs resulting in this
    error message.
    Screen name.............. "J_1IRUTZN"
    Screen number............ 9000
    Screen field............. "UTIL1-REM_BAL"
    Error text............... "FX015: Sign lost."
    Other data:
    Kindly guide me to resolve the issue.
    Regards,
    P.S.Chitra

    Hi,
    Here comes the solution...
    Please implemet the SAP note 1252418...
    Looking very much relavent to your problem...
    Regs,
    Lokesh.

  • Character conversion error

    Hi all,
    We are getting the following error when trying to parse an xml string resource - Character conversion error: "Illegal ASCII character, 0xc2" (line number may
    be too low)-. We have not been able to get around this. We have tried creating the InputSource two different ways:
    reader = new StringReader(stringSource);
    src = new InputSource( reader );
    and
    src = new InputSource(new InputStreamReader(new ByteArrayInputStream(stringSource.getBytes())));
    The problem does appear to go away if we treat the DTD we are validating against as a file. If we set it has a uri, we get the above problem.
    Is anyone else experiencing this problem?
    Any help would be greatly appreciated.
    Thanks in advance,
    Greg

    Hi,
    2 possible solutions:
    1) try using the xerces parser instead of sun's parser
    2) look at the posting at the following url and see wether the posted solution solves your problem: http://forums.java.sun.com/thread.jsp?forum=34&thread=67558
    Hope this helps,
    Kurt.

  • "character conversion error" while parsing xml files

    Hello,
    I'm trying to parse MusicXML (Recordare) files, but I'm getting an exception.
    I'm using the SAX parser (javax.xml.parsers.SAXParser).
    Here is the code I use to instantiate it:
    final javax.xml.parsers.SAXParserFactory saxParserFactory = javax.xml.parsers.SAXParserFactory.newInstance();
    final javax.xml.parsers.SAXParser saxParser = saxParserFactory.newSAXParser();
    final org.xml.sax.XMLReader parser = saxParser.getXMLReader();
    I'm using my own handler, but I get the same exception even if I use org.xml.sax.helpers.DefaultHandler.
    The error I get is:
    Character conversion error: "Illegal ASCII character, 0xc2" (line number may be too low).
    The first few lines of my xml files look like this:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE score-partwise
    PUBLIC "-//Recordare//DTD MusicXML 0.6 Partwise//EN"
    "http://www.musicxml.org/dtds/partwise.dtd">
    <score-partwise>
    [...etc...]
    If I delete the <!DOCTYPE ...> line, then I don't get the exception anymore. But the MusicXML files I get (from some other program) always contain this line, and it would be quite some work to delete them from every file manually.
    So does anyone know if there is a way to avoid deleting that line in every file, while still being able to parse the xml files without exceptions?
    Or maybe does anyone know what the exact cause of the exception is? (because I don't know what exactly causes it)
    Thank you in advance.
    Greetz,
    Jipo

    So does anyone know if there is a way to avoid
    deleting that line in every file, while still being
    able to parse the xml files without exceptions?ok this is side-stepping the real problem but I've used this code to filterout DTD references for other reasons   public static InputStream filterOutDTDRef(InputStream in) throws IOException {
          BufferedReader iniReader = new BufferedReader(new InputStreamReader(in));
          StringBuffer newXML = new StringBuffer();
          for(String line = iniReader.readLine(); line!=null; line = iniReader.readLine())
             newXML.append(line+"\n");
          in.close();
          int s = newXML.indexOf("<!DOCTYPE ");
          if(s!=-1)
             newXML.replace(s,newXML.indexOf(">",s)+1,"");
          return new ByteArrayInputStream(newXML.toString().getBytes());
       }and it actually speeds up the parsing phase too (since the DTD ref.s were on the web and the XML standard mandates that there is a fetch for each xml file parsed..)
    you can feed the above into the InputSource constructor that takes an InputStream argument.
    Now for the real problem... 0xc2 is "LATIN CAPITAL LETTER A WITH CIRCUMFLEX" according to a unicode chart - which is not an ASCII character (as the error message correctly reports). I'm not sure why the file is being parsed as ASCII though? You could try parsing in a FileReader to the inputsource and hope it picks up the default character encoding of your system, and that that character encoding matches the file. Or you could try passing in a FileReader constructed with a explicit character encoding (eg "UTF8") and see if that does the trick?
    asjf

Maybe you are looking for