ORA-06502: PL/SQL APEX 3.2 Upgrade problem

We have 2 APEX environments on our 2 servers. Both servers are running Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production.
One server was running APEX 3.0.0.00.24 (or thereabouts) and was upgraded to 3.2.0.00.27. The other server did not previously have APEX and so 3.2.0.00.27 has been installed as a new version.
We have a form that is filled in by the users. When they click submit the process adds an entry to a table, and then tries to send an email to our users as a HTML formatted email. The process creates a VARCHAR Variable and then using a cursor creates the text for the the email (including all the HTML tags). Running this process on the original server before the upgrade, but using the formatted email resulted in an ORA-06502: PL/SQL error. Creating an email that was a lot simpler (not html formated and therfore shorter) did actually work correctly.
I am lead to believe that there was a bug in Apex versions 3.0 that even if a PL/SQL VARCHAR2 variable was defined as 32000 characters it would actually only be able to use/store a lot less than that (1-2000 characters), and any attempt to use more would result in a ORA-06502: PL/SQL error (string buffer too small type message). I cannot seem to access Metalink at the moment so cannot confirm what the actual bug number is. I am also lead to believe that this error was actually addressed and fixed in one of the releases of APEX 3.1, and definitely in APEX 3.2.
So going with the advice that the issue had been resolved in APEX 3.2, I tried it out in the server with the brand new install. It worked perfectly. I then proceeded to try it in the server that had been upgraded to APEX 3.2.0.00.27. It fails with the same error as before even with the same data as used in the clean install.
Is there a file / setting / configuration somewhere that has to be changed so the APEX applications can use VARCHAR2 variable with more actual characters?
Here is a copy of the code being used:
for c1 in (select DISTINCT OUT_ID, OUT_REQUEST_DATE, OUT_ISSUE, OUT_ETA,
OUT_KEY_COMMENTS, STATUS_UPDATE_DATE, STATUS_NOTES,
OUT_EMAIL_TO, P_STATUS, P_SYS, SYS, STATUS,
ASSIGNED_TO, EMAIL_ADDR, USERNAME, STAT_USERNAME, OUTAGE_LENGTH_BUS_HRS,
AFFECTED_SYSTEM, SMSLIST, NVL(OUT_BUSINESS_IMPACT,'NOT KNOWN') OUT_BUSINESS_IMPACT,
OUT_CAUSE_COMMENT, FINAL_CAUSE, FIX,EM.EMAIL
from HTMLDB_DEV_OPP.VW_OUT_CURRENT_STATUS ST,
APEX_WORKSPACE_APEX_USERS EM
where OUT_ID = :P8_OUT_ID
AND INSTR(':'||ST.EMAIL_ADDR||':',':'||EM.USER_NAME||':') > 0
) loop
if c1.EMAIL is not null then
l_body_html := '<table align="center" border="0"
cellpadding="0" cellspacing="0" width="800">
<tbody>
<tr>
<td colspan="3"
bgcolor="#87b5ed"> 
Name of section within company here
</td>
</tr>
<tr>
<td colspan="3"
style="font-weight: bold; font-size: 28px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"
bgcolor="#87b5ed">DASS OUTAGE - ' || C1.SYS ||'</td>
</tr>
<tr>
<td colspan="3"
style="font-size: 12px; color: rgb(255, 255, 255); font-family: Arial,Helvetica,sans-serif;"
bgcolor="#87b5ed" valign="center">' ||
TO_CHAR(SYSDATE,'DY DD MON YYYY HH24:MI') || '</td>
</tr>
<tr>
<td bgcolor="#87b5ed" width="50"><br>
</td>
<td rowspan="1"
bgcolor="#ffffff" valign="top" width="400">
<table
style="width: 808px; height: 63px;" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td
style="background-color: rgb(21, 103, 171); width: 800px; font-weight: bold; color: rgb(255, 255, 255); font-family: Arial,Helvetica,sans-serif;"
colspan="3"><img alt="" src="cbi_out2_files/spacer.gif" align="middle" height="30" width="20">' || C1.OUT_KEY_COMMENTS ||'</td>
</tr>
</tbody>
</table>
<table
style="height: 722px; width: 804px;" align="center"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 802px;"
valign="top">
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>An
outage has been created in the CBI DASS System. </strong></p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
What is the Outage?</strong><br>'||
C1.OUT_ISSUE||'<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
What is the current status?</strong><br>'||
C1.STATUS||'<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
Status update Comments?</strong><br>
AT '||C1.STATUS_UPDATE_DATE || ' ' ||C1.STAT_USERNAME||' updated the system
with the following:'||C1.STATUS_NOTES ||'<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
Streams Affected?</strong><br>
Reported against '||C1.SYS||', also affecting downstream systems ' ||
C1.AFFECTED_SYSTEM ||'<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
What is the Business Impact?</strong><br>' ||
C1.OUT_BUSINESS_IMPACT||'<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
What was the cause?</strong><br>' ||
C1.FINAL_CAUSE||'. ('||C1.OUT_CAUSE_COMMENT||')<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
Has a fix been identified?</strong><br>'||
C1.FIX||'<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
When did the Outage commence?</strong><br>'||
C1.OUT_REQUEST_DATE||' (Length in Bus/Hrs '||C1.OUTAGE_LENGTH_BUS_HRS||')<br>
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>Estimated
Restore Time / Day?</strong><br>'||
C1.OUT_ETA||'
</p>
<p
style="margin-left: 0px; width: 800px; font-size: 16px; color: rgb(0, 0, 102); font-family: Arial,Helvetica,sans-serif;"><strong>
Click the link for further info View DASS '||:P8_OUT_ID||
'</p>
</td>
</tr>
</tbody>
</table>
</td>
<td bgcolor="#87b5ed" width="50"></td>
</tr>
<tr>
<td bgcolor="#87b5ed"><br>
</td>
<td bgcolor="#1567ab"><br>
</td>
<td bgcolor="#87b5ed"><br>
</td>
</tr>
<tr>
<td colspan="3"
bgcolor="#87b5ed"> </td>
</tr>
</tbody>
</table>
<br>';
APEX_MAIL.SEND(
P_TO => c1.EMAIL,
P_FROM => '"CBI DASS Email"<OUR EMAIL ADDRESS>',
P_BODY => l_body_html,
P_BODY_HTML => l_body_html,
P_SUBJ => 'CBI System / Data Delay Notification '|| c1.OUT_ID || ' (System ' || c1.SYS ||') ');
end if;
end loop;
Thanks
Russell

bump ... does anyone have any ideas?
Thanks Russell

Similar Messages

  • Ora-06502 pl/sql numeric or value error in Report Query in oracle apex

    Hello all,
    I need your help...
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I am using bi publisher to generate PDF reports in oracle apex.
    We were using APEX 4.0 and migrated to 4.2 just a week ago.
    Now we have apex 4.2.
    When I try to Create report query,
    Shared Components >> Report Queries then create.
    and test a report in a create wizard I am getting a error "ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
    I have also applied a patch "16760897".
    This issue is because of number of columns in a query is more then 26.
    If I run a report with 26 or less number of columns then the is working fine, otherwise getting this error.
    My before migration report queries working perfectly even now, but not new queries.
    This issue is also in apex.oracle.com.
    You can see
    Not working  - http://apex.oracle.com/pls/apex/f?p=619:4
    Working - http://apex.oracle.com/pls/apex/f?p=619:2:
    Please give a solution.
    Thanks you.

    check the DB version compatibility with apex 4 or your DB version to apex 4.0 support for upgrade!
    Oracle Application Express Installation Requirements for 4.0

  • ORA-06502: PL/SQL: numeric or value error:  Only in APEX

    I have a routine that works well in SQL Plus and Toad.
    begin
    XXXXXX.process_message(1);
    end;
    Now when I call it via APEX on a submit of a button, it comes back with an error.
    "ORA-06502: PL/SQL: numeric or value error: character to number Error"
    Any pointers to what might because this only in APEX and not on toad.
    Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - Prod
    PL/SQL Release 10.1.0.5.0 - Production
    CORE 10.1.0.5.0 Production
    TNS for Linux: Version 10.1.0.5.0 - Production
    NLSRTL Version 10.1.0.5.0 - Production
    ----------------

    I have updated my profile. I am a development lead at Dell.
    The procedure I am calling is calling create service request pub, update service request up.
    It is just a wrapper around the all these API's and invoking it from APEX on insert of certain values.
    The problem is , this wrapper API works fine with SQL Plus/ TOAD and not via APEX.
    I cannot replicate the error in APEX.oracle.com because it is calling custom ebiz code in our 11.5.10 instance.

  • APEX Validation : ORA-06502: PL/SQL: numeric or value error:

    Hello,
    I need some help for a validation. User put value at 'minutes field'(need a number between 0-59).
    My solution is to make two validations:
    1 - No number:
    Name: P1_MINUTES
    Type : Regular expression
    Validation Expression 1: P1_MINUTES
    Validation Expression 2: ^\d{1,5}(\.\d{1,2})?$
    2 - Higher number then 59:
    Name: P1_MINUTES
    Type : Function returning Boolean
    Validation Expression 1:
    if :P10_TOT_MINUTEN < 60 then
    return true;
    else
    return false;
    end if;
    Validation Expression 2: -
    Validation 2 gives this error(for example value = m) :
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error - the reason is clear value m is not numeric
    How can this be solved!

    Tony,
    This is not the solution for my problem. If the user fills a character (say 'b') then I have still this error. Value 'b' is not numeric.
    I need a solution: Combination from both validations or skip function (if validation number 1 is true then skip validation 2).
    Do you have another solution for this problem.
    Thanks
    Walter

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

  • Report error:ORA-06502: PL/SQL: numeric or value error: character string bu

    We face the above error in HTMLDB (APEX) application Ver 3.1.0. This occurs when we try to display more number of rows/records in drop-down list (LOV in tabular forms). We are able to display 200 records in LOV. When the list of records exceeds 230, we face the below error
    report error:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    the values listed in LOV are from tables (one of the columns in table)
    Could anyone give us a solution?

    Hi
    As you are using a tabular form, you could actually do the following:
    1 - In the tabular form column's attributes, set the following:
    Display as: Select List (query based on LOV)
    Display extra values: Yes
    List of values definition: SELECT null d, null r FROM DUAL
    2 - Add a new page item and set it to generate your select list
    3 - Create an HTML region with no template and use the following for its source:
    &lt;script type="text/javascript"&gt;
    function loadList(c, l)
    var s = document.getElementsByName(c);
    var lItem = document.getElementById(l);
    var lLength = lItem.options.length;
    var k;
    var j;
    var x = lItem.innerHTML;
    var v;
    var o;
    var z;
    for (k = 0; k &lt; s.length; k++)
    z = s[k];
    v = z.value;
    z.options.length = 0;
    for (j = 0; j &lt; lLength; j++)
    o = new Option()
    o.value = lItem[j].value;
    o.text = lItem[j].text;
    z.options[j] = o;
    z.value = v;
    if (z.selectedIndex == -1)
    z.selectedIndex = 0;
    loadList("f05", "P1_MGR");
    &lt;/script&gt;
    (Change "f05" and "P1_MGR" as appropriate to your column and your new page item respectively)
    Now, when you load the page, the select list contains a null entry plus the entry already on the database. The javascript kicks in automatically, loops through every entry in the "f05" column, copies the existing value, replaces the select list with the new page item version and sets its value to the copied value.
    Your new page item could be in a DIV tag that has a style of "display:none" to hide it from view.
    Andy

  • Report error: ORA-06502: PL/SQL: numeric or value error: NULL index table k

    Hi everybody,
    I have two Distinct Databases on two distinct servers. (Oracle Ent. Release 10.2.0.3.0 on AIX 5.3). After I install the latest patch last week, One of the APEX installation has some problems on Home>Application Builder Page. The error message is very random and
    report error:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value.
    When i change the view (details to icons), everything goes to normal. This error message is reflected some of the pages (report region) of some of my applications randomly. When it appears in a report region, i deselect the order method of the region, the result is normal.
    But the other APEX application on the other instance has no problem. It is a bug? or Should i re-install the APEX instance?
    Thank you for your interest?
    Gökhan ÇATALKAYA

    No, but we have a reproducible test case now so we're working on it. See ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    Scott

  • PL/SQL function body returning SQL query - ORA-06502: PL/SQL: numeric or value error

    I'm attempting to dynamically generate a rather large SQL query via the "PL/SQL function body returning SQL query" report region option.  The SQL query generated will possibly be over 32K.  When I execute my page, I sometimes receive the "ORA-06502: PL/SQL: numeric or value error" which points to a larger than 32K query that was generated.  I've seen other posts in the forum related to this dynamic SQL size limitation issue, but they are older (pre-2010) and point to the 32K limit of the DNS (EXECUTE IMMEDIATE) and DBMS_SQL.  I found this post (dynamic sql enhancements in 11g) which discusses 11g no longer having the 32K size limitation for generating dynamic SQL.  Our environment is on 11gR2 and using ApEx 4.2.1.  I do not know which dynamic SQL method -- DNS or DBMS_SQL -- ApEx 4.2.1 is using.  Can someone clarify for me which dynamic SQL method ApEx uses to implement the "PL/SQL function body returning SQL query" option?
    As a test, I created a page on apex.oracle.com with a report region with the following source:
    declare
      l_stub varchar2(25) := 'select * from sys.dual ';
      l_sql  clob := l_stub || 'union all ';
      br     number(3) := 33;
    begin
      while length ( l_sql ) < 34000 loop
        l_sql := l_sql || l_stub || 'union all ';
      end loop;
      l_sql := l_sql || l_stub;
      for i in 1 .. ceil ( length ( l_sql ) / br ) loop
        dbms_output.put_line ( dbms_lob.substr ( l_sql, br, ( ( i - 1 ) * br ) + 1 ) );
      end loop;
      return l_sql;
    end;
    The dbms_output section is there to be able to run this code in SQL*Plus and confirm the size of the SQL is indeed larger than 32K.  When running this in SQL*Plus, the procedure is successful and produces a proper SQL statement which can be executed.  When I put this into the report region on apex.oracle.com, I get the ORA-06502 error.
    I can certainly implement a work-around for my issue by creating a 'Before Header' process on the page which populates an ApEx collection with the data I am returning and then the report can simply select from the collection, but according to documentation, the above 32K limitation should be resolved in 11g.  Thoughts?
    Shane.

    What setting do you use in your report properties - especially in Type and in Region Source?
    If you have Type="SQL Query", then you should have a SELECT statement in the Region Source. Something like: SELECT .... FROM ... WHERE
    According to the ERR-1101 error message, you have probably set Type to "SQL Query (PL/SQL function body returning SQL query)". In this situation APEX expects you to write a body of a PL/SQL function, that will generate the text of a SQL query that APEX should run. So it can be something like:
    declare
    mycond varchar2(4000);
    begin
    if :P1_REPORT_SEARCH is not null THEN
    mycond:='WHERE LAST_NAME like :P1_REPORT_SEARCH ||''%''';
    end if;
    return 'select EMPLOYEE_ID, FIRST_NAME, LAST_NAME from EMPLOYEES ' ||mycond;
    end;
    And for escaping - are you interested in escaping the LIKE wildcards, or the quotes?
    For escaping the wildcards in LIKE function so that when the user enters % you will find a record with % and not all functions, look into the SQL Reference:
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm
    (You would than need to change the code of your function accordingly).
    If you are interested in escaping the quotes, try to avoid concatenating the values entered by the user into the SQL. If you can, use bind variables instead - as I have in my example above. If you start concatenating the values into the text of SQL, you are open to SQLInjection - user can enter anything, even things that will break your SQL. If you really need to allow users to choose the operator, I would probably give them a separate combo for operators and a textfield for values, than you could check if the operator is one of the allowed ones and create the condition accordingly - and than still use bind variable for inserting the filtering value into the query.

  • ORA-06502: PL/SQL: at the end of an Excel Download report

    Hi,
    Within my apex application I have the possibility to download a file from ie. page 7 (which is linked to a query in page 8). When I open the downloaded file, I find an error at the end of the sheet:
    <pre>report error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error</pre>
    The thing is, the query that retrieves this report works perfectly, and when put in sql developer, it retrieves the same number of rows.
    So it must be that after the query has finished with all the rows, in encounters some kind of character ie. a space , that can´t convert to number and thus gives the error.
    Something worth noting is that, when I actually execute the page directly (page 8), that executes de query, it doesn´t give me the error on the excel.
    Any recommendations on a possible reason are welcome.
    Thank you,
    Javier

    I am also hitting this problem. Any pointer plz..

  • Ora-06502:pl/sql and ora-06512 at sys.owa_util errors

    Greetings -
    I have just installed APEX 2.2 in my 9.2.0.7 database and am going through the exercises in the "2 Day+ Application Express Developer's Guide." I was making good progress, until I got to Chapter 5, How to Control Form Layout. I created the script "ht_emp", as instructed. Everything in the script works, except for the "create or replace trigger bi_ht_emp" part. It fails with the following errors:
    ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", lone 328 ORA-06512: at "SYS.HTP", line 862 ORA-06512: at "SYS.HTP", line 977 ORA-06512: at "SYS.HTP", line 995 ORA-06512: at "FLOWS_020200.WWV_FLOW_SW_API", line 428 ORA-01003: no statement parsed. I have confirmed that nls_length_semantics = BYTE
    Any suggestions?
    Thanks in advance - Gail

    Scott -
    Here's the part of the script that chokes --
    CREATE OR REPLACE TRIGGER bi_ht_emp
    BEFORE INSERT ON ht_emp
    FOR EACH ROW
    BEGIN
    SELECT ht_emp_seq.nextval
    INTO :new.emp_id
    FROM DUAL;
    :new.rec_create_date := SYSDATE;
    END;
    Thanks fro helping -
    Gail

  • Display Image in Report Colum,  ORA-06502: PL/SQL whe column format is set

    Hi @all
    i created a small table
    CREATE TABLE my_sal201 (
    grafikdid VARCHAR2(38) NULL,
    grafik BLOB NULL,
    mimetype VARCHAR2(255) NULL
    then i inserted one column with a page process
    BEGIN
    IF (:p6_filename IS NOT NULL)
    THEN
    INSERT INTO my_sal201
    (grafikdid, grafik, mimetype)
    SELECT meb_ora.mkdid(), blob_content, 'image/gif'
    FROM wwv_flow_files
    WHERE NAME = :p6_filename;
    DELETE wwv_flow_files
    WHERE NAME = :p6_filename;
    :p6_filename := NULL;
    END IF;
    END;
    after that i want to show the columns and the image in a report. so i created a report in a new region quite similar to the example in the obe
    it works fine, the image columns is shown as "[datatype]"
    whenever i change the format of the image colum of the report to
    DOWNLOAD:MY_SAL201:GRAFIK:GRAFIKDID::::::inline:Herunterladen
    (just one example, IMAGE:... does not work as well)
    no more rows are shown but the error h3. "ORA-06502: PL/SQL: numerischer oder Wertefehler: Fehler beim Konvertieren von Zeichen zu Zahl"
    what did i do wrong?
    gretz
    peter

    i'm to silly to work with images :-ß
    i did copy ur example to another app on http://apex.oracle.com/pls/otn/. fine->igames are shown.
    on a new page in my local app, i did exactly the same (create a table, procedure, ect) it does not work.
    rows are shown inthe report, but no images, instead the icon for a broken/missing image is displayed.
    i tried to debug using firebug:
    in the sample app on otn, when i point the mnouse over the procedure call, the image appears in a tool-tip
    in my app, the code is quite simmilar, nothing happens. no icon
    >
    <img width="50" height="50" src="WMF_GL_INTMAN001.DISPLAY_IMAGE?inID=1"/>
    >
    help!!!
    maybe this is important: i'm using apex 3.2.0.00.27 on db version 11g
    Edited by: yeti on 28.08.2009 13:37

  • ORA-06502: PL/SQL: numeric or value error: NULL index table key value Repor

    W've been experiencing the Oracle Error: ORA-06502: PL/SQL: numeric or value error: NULL index table key value Report’ [we are currently on apex v3.0.1]. From the forum there was a reference to a bug fix: apex bug (6416829) fixed in 3.1. When we view '6416829' in Metalink we can see the bug title but cannot see any details as it's protected. Can anyone shed some light on why it's protected or provide further details.
    We have many LIVE customers reporting this error and we want to be certain it's fixed in v3.1.
    (currently we are working around this by flushing the shared pool but this is not ideal).
    Any help would be appreciated.

    Scott,
    This error has been thrown several times in the past 24 hours. Yesterday several of my reports threw the error, these reports have done so in the past. This morning APEX has begun throwing the error of which I have seen only once before. This is occuring at Home>Application>My Application. The error appears when I attempt to View the report in Details mode, is OK when I view the report in Icons mode. The error is occuring in my Prodution environment which has not been updated since 2/25/2009.
    As before, I edited the SQL on my application's reports and the error then disappeared.
    We are running Application Express 3.2.0.00.27 and Oracle Release 10.2.0.1.0. My browser is IE 7.0.
    Plan to test later with FireFox provided I can download it to see if this might browser related.
    Any inforamtion or guidance is appreciated.
    Jeff

  • ORA-06502:PL/SQL:numeric or value error. Dynamic SQL the only answer??

    ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
    I have an HTMLDB report that errors with the above message. The query is over 7000 characters long so I'm guessing this is the cause. If I retrieve the query from a query table, replace the variables in the LONG query using PL/SQL and execute using dynamic SQL, are the HTMLDB reporting features the same as if I was using a simple SQL query? Is there a better way? I will need to 'drill-down' from this report so how do I create the links? The only HTMLDB PL/SQL package I can find mentioned in the User's Guide is HTMLDB_PLSQL_JOB.
    Cheers, Paul

    Hello All,
    I have the same problem.
    For me it started when i got about 500 rows in the table
    on which the LOV is based.
    With a lot of trying with substr I managed to find the size of the string which it still accepted, which was 51 characters.
    So I thought it was some glitch in the APEX insides, and since I had no time to resolve it further, I went on working.
    But I have to resolve it now, because the following mysterious behaviour is occurring:
    Every few records added to the base table, the problem occurs again, and I can resolve it by cutting down the string
    with one character.
    I have now reached 39 characters !?
    I am afraid that I will end up with 1 character or even null.
    If I switch to Popup list based on LOV there's no problem, and the complete strings are shown.
    The maximum length of the string in my basetable is 252, but the data in it now reaches 55 at most.
    Any idea welcome!
    I did already recreate the master-detail form from scratch, but there the same behaviour.
    greetings,
    Richard Kloostra

  • ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL"

    Was working on tutorial from the:
    Oracle Database Express Edition 2 Day Plus Application Express Developer Guide
    Working on the section 4: How to Control Form Layout.
    Ran into a problem trying to compile the Create HT-EMP Table script.
    keep getting this error for this particular segment creating the bu_ht_emp trigger:
    pp. 4-2 and 4-3
    CREATE OR REPLACE TRIGGER bi_ht_emp
    BEFORE INSERT ON ht_emp
    FOR EACH ROW
    BEGIN
    SELECT ht_emp_seq.nextval
    INTO :new.emp_id
    FROM DUAL;
    :new.rec_create_date := SYSDATE;
    END;
    ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", line 354....etc
    I've check the syntax for the entire script and it all checks out. Does anyone have a clue why this is failing?

    If I'm looking at the same DDL, not seeing where it would throw an owa_util error, are you running it in the apex script editor?
    Just plain sqlplus doesn't like the empty line stuck in with the list of check constraints on the emp_dept column, after fixing that up (and dropping the sequence that got created on the first pass) the DDL and insert runs fine-

  • Plugin tab menu  - ORA-06502: PL/SQL: numeric or value error

    Hi All ,
    i import Tab menu and I want to use only the horizontal menu.
    http://www.apex-plugin.com/oracle-apex-plugins/odtug-competition/tab-menu_203.html
    I am getting following error.
    " Error in PLSQL code raised during plug-in processing.
    ORA-06502: PL/SQL: numeric or value error "
    this my account
    workspace : BUS_SOL
    username : test
    password : test123
    Application name test123
    I imported following component
    1.region_type_plugin_net_vanbaren_apex_tab_menu_v1.01.sql2 in plugin
    2.Theme_page_templates_A4.2.sql in theme
    3.Tabmenu_verticale.css in css
    I have no idea where I have to specify the tab and sub tab names.
    It will be really helpful . if some one help on this.
    Thank you
    Karthik

    Karthik
    Karthik C wrote:
    I have no idea where I have to specify the tab and sub tab names.
    The parent and standard tabs are defined at Shared Components > Tabs.
    The basic idea of the plugin is to use the native tab concept of apex to make a "drop down" menu.
    For a "drop down" menu you have to have two levels. So parent tabs and standard tabs. (Shared components > tabs)
    The demo application you have in your apex.oracle.com workspace uses only one level of tabs (Only standard tabs). So the plugin will not work in this application.
    Unfortunately there is no way of a application that is set up for one level tabs to turn into a two level tabs application. So please set up a new two level tab application before we go in more detail of how to use the plugin.
    If you're going to use this plugin in a new applcation please please please start using lists instead of tabs.
    List give more options than tabs.
    List can have more than 2 levels. Tabs can have a maximum of 2 tabs and then only if you defined the application as 2 levels at creation.
    And swiching a sublist entry between parents is just setting a different parent for the entry. For the tabs you not only need to change the standerd tab but also the page it references.
    And in this case the most relevant there is already a drop down menu as list template. So there is no neason to use this plugin that needs isn't exactly plug and play.
    Nicolette

Maybe you are looking for