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

Similar Messages

  • 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

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

  • 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

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

    The oracle application express environment is created by installing the HTTP Server on the windows server and the application express 3.2.1 components on the 11.1.0.7 oracle database on UNIX. The installation is successfully and have not seen any issues during the installation. After completing all the steps, when tried to login and click the application builder or workspace components, I see the error message
    report error:ORA-06502: PL/SQL: numeric or value error: character to number.
    This error message is seen on most of the pages when trying to accessed and not able to understand the reasons behind it. Its a brand new environment setup and not even presented to developers to test it.
    Below error message is always seen when trying to access most of the components like application builder, schema comparison and some other tabs. Please advice
    report error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Edited by: user589320 on Jun 9, 2011 5:17 PM

    I think its better you use APEX 4.x version ratherthan using old version.
    You will get more features and some bug fixes and also it's easy for you to get some help when you need.
    * If this answer is helpfull or correct then please mark it and grant the points.

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

    Hello Gurus,
    I keep getting the following error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    It happens on wizard generated tabular form.
    DECLARE
    v_venue_prsntd_qtr varchar2(3);
    v_venue_prsntd_fy  number;
    BEGIN
    FOR i IN 1 .. apex_application.g_f02.COUNT
      LOOP
        IF apex_application.g_f05 (i) IS NOT NULL THEN
            v_venue_prsntd_qtr :=
             Case WHEN TO_CHAR(apex_application.g_f05 (i), 'MON') IN ('OCT','NOV','DEC') THEN '1'
                  WHEN TO_CHAR(apex_application.g_f05 (i), 'MON') IN ('JAN','FEB','MAR') THEN '2'
                  WHEN TO_CHAR(apex_application.g_f05 (i), 'MON') IN ('APR','MAY','JUN') THEN '3'
                  ELSE '4'
                  END;
      -- INTO v_venue_prsntd_qtr
      -- FROM venue_prsntd
      -- WHERE venue_prsntd_seqno = apex_application.g_f02 (i)
      -- AND dfcy_seqno = apex_application.g_f03 (i)
      -- AND apex_application.g_f05 (i) IS NOT NULL;
    ----fiscal year
    --    v_venue_prsntd_fy :=
    --       CASE WHEN TO_CHAR(TO_NUMBER(TO_CHAR(apex_application.g_f05(i), 'MMDD'))) < 1001 THEN --------TO_CHAR(apex_application.g_f05 (i),'YYYY')
    --        ELSE TO_CHAR(TO_NUMBER(TO_CHAR(apex_application.g_f05 (i),'YYYY')) + 1)
    --      END;
       --  INTO v_venue_prsntd_fy
       --  FROM venue_prsntd
       --  WHERE venue_prsntd_seqno = apex_application.g_f02 (i)
       --  AND dfcy_seqno = apex_application.g_f03 (i)
       --  AND apex_application.g_f05 (i) IS NOT NULL;
    ---END IF;
      --- IF apex_application.g_f02 (i) IS NULL AND apex_application.g_f05 (i) IS NOT NULL Then
              -- INSERT INTO venue_prsntd(venue_prsntd_qtr, venue_prsntd_fy)
              --                   VALUES(v_venue_prsntd_qtr, v_venue_prsntd_fy);
                 UPDATE VENUE_PRSNTD
                      SET VENUE_PRSNTD_QTR = to_number(v_venue_prsntd_qtr)
                         -- VENUE_PRSNTD_FY = v_venue_prsntd_fy
                 WHERE VENUE_PRSNTD_SEQNO = APEX_APPLICATION.G_F03(i);
    END IF;
    END LOOP;
    END;I am trying to update venue_prsntd_qtr. I have commented everything else out to see if I can limit where the error is coming from.
    qtr is a number field in the database. I have gone back and forth with variable type in the code and still get the same error.
    I am using oracle db 10g, apex 3.2.1
    Thanks
    Mary

    Hi,
    I am guessing that apex_application.g_f05 is a date field. If that is the case, you need to use to_date() before using to_char(). For example:
    SELECT to_char('01-jan-10', 'MON') FROM dual -- Error!
    SELECT to_char(to_date('01-jan-10'), 'MON') FROM dual -- Ok!
    I hope this helps.
    Luis

  • Numeric or value error: hex to raw conversion error , pls help

    I am having problem with a sproc which accepts a Raw parameter.
    I have a table called Profile:
    CREATE TABLE PROFILES
    PROFILEID INTEGER NOT NULL,
    USERID INTEGER NOT NULL,
    PROFILE RAW(255)
    and a sproc named addprofile
    CREATE OR REPLACE PROCEDURE addprofile
    profile IN RAW,
    userName IN VARCHAR2
    AS
    userId INT;
    BEGIN
    GetUserIdByName( userName, userId);
    INSERT INTO Profiles
    ( ProfileID,userId , profile )
    VALUES ( Profiles_ProfileID_SEQ.NEXTVAL,AddProfile.userId ,
    AddProfile.profile );
    END;
    I am calling the Ent Library's Insert profile method which is part of DbProfileProvider.cs (Security App block). It is trying to persist a serialized profile object into the database.
    private void InsertProfile(string userName, byte[] serializedProfile,
    Data.Database securityDb, IDbTransaction transaction)
    DBCommandWrapper cmd = securityDb.GetStoredProcCommandWrapper
    (SPAddProfile);
    cmd.AddInParameter("userName", DbType.String, userName);
    cmd.AddInParameter("profile", DbType.Binary, serializedProfile);
    securityDb.ExecuteNonQuery(cmd, transaction);
    I get the following error:
    Any suggestion on what needs to be changed to get this working? thanks!
    Exception Details: Oracle.DataAccess.Client.OracleException: ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error ORA-06512: at line 1
    Stack trace:
    [OracleException: ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error
    ORA-06512: at line 1]
    Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
    Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)
    Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
    Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteNonQuery(DBCommandWrapper command)
    Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DBCommandWrapper command, IDbTransaction transaction)
    Microsoft.Practices.EnterpriseLibrary.Security.Database.DbProfileProvider.InsertProfile(String userName, Byte[] serializedProfile, Database securityDb, IDbTransaction transaction)
    Microsoft.Practices.EnterpriseLibrary.Security.Database.DbProfileProvider.SetProfile(IIdentity identity, Object profile)
    [InvalidOperationException: Error saving the profile for the following user 'test'.]
    Microsoft.Practices.EnterpriseLibrary.Security.Database.DbProfileProvider.SetProfile(IIdentity identity, Object profile)
    EntLibSecuritySample.DFO.Security.SecurityHelper.SetUserProfile(IIdentity identity, Object Profile) in C:\DFO\Sample\Security\EntLibSecuritySample\SecurityHelper.vb:285
    [ApplicationException: An error has occurred saving profile object to Datastore. See stack trace for further information]
    EntLibSecuritySample.DFO.Security.SecurityHelper.SetUserProfile(IIdentity identity, Object Profile) in C:\DFO\Sample\Security\EntLibSecuritySample\SecurityHelper.vb:287
    EntLibSecuritySample.ProfilePage.cmdSaveProfile_Click(Object sender, EventArgs e) in C:\DFO\Sample\Security\EntLibSecuritySample\profile.aspx.vb:59
    System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    System.Web.UI.Page.ProcessRequestMain() +1292

    Harsh,
    I am not a user of the Enterprise Library so I can not speak to the specifics of that. However, here is a short sample that is based on the information you've provided. Perhaps it will be useful.
    Database:
    create table profiles
      profileid integer not null,
      userid    integer not null,
      profile   raw(255)
    create or replace procedure addprofile
      p_profileid in integer,
      p_userid    in integer,
      p_profile   in raw
    as
    begin
      insert into
        profiles (profileid, userid, profile)
        values (p_profileid, p_userid, p_profile);
    end;
    /C# code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace HarshTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // connect to local db using o/s authentication
          OracleConnection con = new OracleConnection("User ID=/; Pooling=False");
          con.Open();
          // create command object and set properties
          OracleCommand cmd = new OracleCommand();
          cmd.Connection = con;
          cmd.CommandText = "ADDPROFILE";
          cmd.CommandType = CommandType.StoredProcedure;
          // parameter object for profileid
          OracleParameter p_profileid = new OracleParameter();
          p_profileid.OracleDbType = OracleDbType.Int32;
          p_profileid.Value = 1;
          p_profileid.Direction = ParameterDirection.Input;
          // parameter object for userid
          OracleParameter p_userid = new OracleParameter();
          p_userid.OracleDbType = OracleDbType.Int32;
          p_userid.Value = 1;
          p_userid.Direction = ParameterDirection.Input;
          // create a byte array for the raw value
          ASCIIEncoding encoder = new ASCIIEncoding();
          byte[] byteArray = encoder.GetBytes("TestProfile");
          // parameter object for profile
          OracleParameter p_profile = new OracleParameter();
          p_profile.OracleDbType = OracleDbType.Raw;
          p_profile.Value = byteArray;
          p_profile.Direction = ParameterDirection.Input;
          // add parameters to collection
          cmd.Parameters.Add(p_profileid);
          cmd.Parameters.Add(p_userid);
          cmd.Parameters.Add(p_profile);
          // execute the stored procedure
          try
            cmd.ExecuteNonQuery();
          catch (OracleException ex)
            Console.WriteLine(ex.Message);
          // clean up objects
          p_profile.Dispose();
          p_userid.Dispose();
          p_profileid.Dispose();
          cmd.Dispose();
          con.Dispose();
    }Maybe the part about creating the byte array is what you are missing...
    - Mark

  • Error Description:TransformCopy 'DTSTransformation__57' conversion error

    We are getting error in Interphase while data moving from SAP to Plexus Interphase
    Error Source: Microsoft Data Transformation Services (DTS) Data Pump
    Error Description:TransformCopy 'DTSTransformation__57' conversion error: Conversion invalid for datatypes on column pair 1 (source column 'Col057' (DBTYPE_STR), destination column 'reissue_no' (DBTYPE_I4)).
    Error Help File:sqldts80.hlp
    Error Help Context ID:30501
    1002049940|AB-24966-001|AB-24966-001|8DVAH||OPEN|5013040-K Welcher OHWQM|Q09V36-07 3Q07BB ATM REMOVAL WNI SERVICE ONLY FOR HOU1B12 Vantage01 BSC 01Network Integration Perform pre-checks on the system and ISSHO files run files and support Sprint drive team in test per ND Houston01RG ND25 ME4 Draft062907. WNI hrs 50|||0000641242|Nextel Systems Corp|||||H003XW001|15413 Vantage pkwy|||HOUSTON|TX|77032|US||||||15413 Vantage pkwy|||HOUSTON|TX|77032|US||||||||||6500 Sprint Parkway|||Overland Park|KS|66251-6108|US|Sevice_NI|0006750279||B200707139.0|01/09/2009||||||HSTPTXPR00W|H003XW001||||||04/06/2009||04/24/2009||||||04/24/2009|||||||||||07/10/2007|||||||||||||||||||0524334||||||||||||||01/09/2009||||||||AB-24966-001|||
    We are not able to under stand the error relates . Please helpme with your suggestions.
    Thanks
    Hemanth

    hi
    its due to the converion of datatypes between the two system.

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

  • 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

Maybe you are looking for

  • Design Concern for XI Scenario!

    Hi All, Do you have any design solutions for following scenarios with respect to BPM,Adapaters and sync/async flow: 1. JSP - > XI---->DB 2. JSP<--->SAPR/3<->XI<--->DB 3. DB-->XI->JSP 4. JSP<->XI<--->DB Appreciated your  time! Will get you reward! Tha

  • Streamed MP3 music files losing first few seconds

    My Apple TV seems to drop the first few seconds of MP3 music files when they are streamed from iTunes, but not when they are synced to the Apple TV. The number of seconds that are dropped varies from none at all for some songs to 20, or much more tha

  • Pivot query probelm

    Hi, I am trying to do a pivot report, first I did a simple pivot hard-coding the columns that I was about to use but, it is not convenient so I was asked to do a dynamic report where the columns were selected by a sub-query so I  followed the solutio

  • 7'x18' Mural Design, Illustrator CS4 will not produce as small printiable PDF to show client

    I am designing a 7' x 18' Photo/Graphic mural for a client.  The output provider said to work in full size.  However, I need a pdf, or any kind of file that will print the image on 8.5x11 paper for client review.  I've tried opening the file in InDes

  • Javac: file not found

    I recently downloaded NetBeans 1.6 Java SE and i'm trying to learn programming. I set my path variable to C:\Program Files\Java\jdk1.6.0_03\bin as it said somewere on Javas website. In NetBeans 1.6 this is the code i typed class HelloWorld { public s