Generation XML problem in APEX ORA-06502

Hi, I have a problem with the generation of XML, I developed an application in the APEX, and in an html page, I have this process: +.

declare
l_XML varchar2 (32767).
Start
.......
Select xmlElement
(
"iva"
xmlElement ("numeroRuc", J.RUC),
xmlElement ("razonSocial", J.RAZON_SOCIAL),
xmlElement ("idRepre", J.ID_REPRE),
xmlElement ("rucContador", J.RUC_CONTADOR),
xmlElement ("anio", J.ANIO),
xmlElement ("my", J.MES),

xmlElement
(
"shopping."
(
Select xmlAgg
(
xmlElement
(
"detalleCompra,"
-xmlAttributes (K.ID_COMPRA like "COMPRA"),
xmlForest
(
K.COD_SUSTENTO as "codSustento."
K.TPLD_PROV as "tpldProv."
K.ID_PROV as "idProv."
K.TIPO_COMPROBANTE as "tipoComprobante."
TO_CHAR (K.FECHA_REGISTRO, ' DD/MM/YYYY "") as "fechaRegistro."
K.ESTABLECIMIENTO as "food."
K.PUNTO_EMISION as "puntoEmision."
K.SECUENCIAL as "secuencial".
TO_CHAR (K.FECHA_EMISION, ' DD/MM/YYYY "") as "fechaEmision."
K.AUTORIZACION as 'autorizacion. "
TO_CHAR (K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva."
TO_CHAR (K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible."
TO_CHAR (K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav."
TO_CHAR (K.MONTO_ICE, 9999999999.99) as "montoIce."
TO_CHAR (K.MONTO_IVA, 9999999999.99) as "montoIva."
TO_CHAR (K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes."
TO_CHAR (K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios."
TO_CHAR (K.VALOR_RET_SERV_100, 9999999999.99) as 'valorRetServ100 '.
),
xmlElement
(
'air ',.
(
Select xmlAgg
(
xmlElement
(
"detalleAir,"
xmlForest
(
P.COD_RET_AIR as "codRetAir."
TO_CHAR (P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir."
TO_CHAR (P.PORCENTAJE_AIR, 999.99) as "porcentajeAir."
TO_CHAR (P.VAL_RET_AIR, 9999999999.99) as 'valRetAir '.
)
)
)
ANEXO_COMPRAS p
where P.ID_COMPRA = K.ID_COMPRA
AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
)
),
xmlElement ("estabRetencion1", K.ESTAB_RETENCION_1),
xmlElement ("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
xmlElement ("secRetencion1", K.SEC_RETENCION_1),
xmlElement ("autRetencion1", K.AUT_RETENCION_1),
xmlElement ("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY'));
xmlElement ("docModificado", K.DOC_MODIFICADO),
xmlElement ("estabModificado", K.ESTAB_MODIFICADO),
xmlElement ("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
xmlElement ("secModificado", K.SEC_MODIFICADO),
xmlElement ("autModificado", K.AUT_MODIFICADO)
)
)
SRI_COMPRAS k
WHERE K.ID IS NOT NULL
AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
AND K.ID BETWEEN 1 AND 25
)
)
). getClobVal()
in l_XML
ANEXO_INFORMANTE j
where J.ID_INFORMANTE =: P3_MES
and J.RUC =: P3_ID_RUC
and J.ANIO =: P3_ANIO
and J.MES =: P3_MES;

-HTML
sys.owa_util.mime_header('Text/XML',false);
sys. HTP.p ("Content-Length: ' |") length (l_XML));
sys.owa_util.http_header_close;
sys. HTP. Print (l_XML);
end;



Now my table contains over 900 lines and only when I specifically chose 25 rows of the table "ANEXO_COMPRAS" in the case (AND K.ID BETWEEN 1 AND 25) the generated XML.

I think the problem may be with the data type that is declared 'varchar2', but I tried with "CLOB" data type, and the error is the same. +

declare
l_XML CLOB.
Start
-View XML
sys. HTP.init;
wwv_flow.g_page_text_generated: = true;
wwv_flow.g_unrecoverable_error: = true;

-Select XML
Select xmlElement
( .......

)
SRI_COMPRAS k
WHERE K.ID IS NOT NULL
AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
.........
). getClobVal()
in l_XML
ANEXO_INFORMANTE j
where J.ID_INFORMANTE =: P3_MES
and J.RUC =: P3_ID_RUC
and J.ANIO =: P3_ANIO
and J.MES =: P3_MES;

-HTML
sys.owa_util.mime_header('Text/XML',false);
sys. HTP.p ("Content-Length: ' |") length (l_XML));
sys.owa_util.http_header_close;
sys. HTP. Print (l_XML);
end;

The error generated is ORA-06502: PL/SQL: digital error or value+ _

Please I need your help. I don't know how to solve this problem, how to use the 'CLOB' data type to the XML file can be generating+.

Published by: JohannaCevallos07 on 26-sep-2012 10:52

In the DECLARE section:

l_xml       clob;
chunk_size  pls_integer := 32767;

then replace

htp.print(l_XML);

with the loop:

for i in 0..trunc((dbms_lob.getlength(l_xml) - 1) / chunk_size)
loop
  htp.prn( dbms_lob.substr(l_xml, chunk_size, 1 + i*chunk_size) );
end loop;

Tags: Database

Similar Questions

  • Validation of the APEX: ORA-06502: PL/SQL: digital error or value:

    Hello

    I need help for validation. The user set to ' field minutes'(besoin d'un nombre compris entre 0 et 59).

    My solution is to do two commits:

    1 - no number:
    Name: P1_MINUTES
    Type: Regular Expression
    Validation expression 1: P1_MINUTES
    ({Validation expression 2: ^ \d{1,5}(\.\d{1,2})? $

    2. more high level then 59:
    Name: P1_MINUTES
    Type: Function return Boolean
    1 validation expression:
    If: P10_TOT_MINUTEN < 60 then
    Returns true;
    on the other
    Returns false;
    end if;
    Validation expression 2: -.

    2 validation gives this error (for example a = m value):
    ORA-06502: PL/SQL: digital or value error: character number conversion error - the reason is clear m value is not numeric

    How this problem can be solved!

    Condition 2 validation by using a condition of PL/SQL Expression:

    regexp_like(:p1_minutes, '^\d{1,5}(\.\d{1,2})?$')
    
  • Problem with error ORA-06502: PL/SQL: numeric string or the error value

    Hello

    I use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.

    ORA-06502: PL/SQL: numeric string or the error value

    SD wrote:
    Hello

    I use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.

    ORA-06502: PL/SQL: numeric string or the error value

    Yes, it's a mistake to dependent data.

    Manage: SD
    Status level: Beginner
    Join date: November 21, 2001
    Messages total: 289
    Total Questions: 189 (183 pending)

    Why wasting you time here when you get rarely answers your questions?

  • Process apex Pl/SQL error: ORA-06502: PL/SQL: digital error or value: specified incorrect LOB Locator

    Apex 4.2

    I searched through the forums of the research about this error, but I do not understand what to do from here. I am writing a process that sends an e-mail when a value of the claim is made (or on a button click). Procedure is as follows:

    DECLARE
       l_body        clob;
       l_body_html   clob;
       l_subject    varchar2(100);
    
    BEGIN
      
    l_body := empty_clob();
    l_body_html := empty_clob();
    
    
    IF V('REQUEST') in ('SAVE_ME') AND :P32_PARENT_UPDATED_FL IS NOT NULL THEN
       l_subject :=  'Survey Job Request Updated'||utl_tcp.crlf||utl_tcp.crlf;
       l_body := 'Update'||utl_tcp.crlf;
    
       l_body_html := '<html>
          <head>
             <style type = "text/css">
                 /* Can add style attributes later */
             </style>
          </head>
          <body>'||utl_tcp.crlf;
       l_body_html := l_body_html ||'Survey Job Request has been updated.<br /><br />'||utl_tcp.crlf;
       l_body_html := l_body_html ||'Title: '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_TITLE||utl_tcp.crlf;
       l_body_html := l_body_html ||'<br />Request Category : '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_REQUEST_CATEGORY||utl_tcp.crlf;
       l_body_html := l_body_html ||'<br />Update Date: '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_UPDATE_DATE||utl_tcp.crlf;
       l_body_html := l_body_html ||'<br />Updated By: '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_LAST_EDITED_BY_USERID||utl_tcp.crlf;
       l_body_html := l_body_html ||'</body></html>';
    
    
    
    
    
    END IF;
    
    :P32_CANCELLATION_REASON := l_body_html;
    
    apex_mail.send(
       p_to             =>  '[email protected]',
       p_from           =>  '[email protected]',
       p_body           =>  l_body_html,
       p_body_html      =>  l_body_html,
       p_subj           =>  l_subject);
    
    END;
    
    
    
    
    
    
    
    
    
    

    I added two lines to the code (lines 08 and 09) and when I run my program, I now get the error:

    • ORA-21560: 3 argument is null, invalid or out of range

    Without these two lines, I received the error:

    ORA-06502: PL/SQL: digital error or value: specified incorrect LOB Locator

    I'm not quite sure what is wrong or what I can change. There seems to be right, and in fact, it worked before. I have no idea why this error keeps popping up. Any help on that would be great. Thanks in advance.

    Hello

    NewApexCoder wrote:

    Hmmm... good point. I think that apex_mail.send must be called inside the IF block. But in the future, I added several conditional statements, won't I need to include the apex_mail.send function in each IF block? But at the same time, there is the case that if no conditional instructions are met? Tests, when none of the conditions are true (when I had a second IF block in the code), an email would not be defined, which is correct. Could that be causing a problem however. If the IF block is not filled could he always try to send an email about anything or the l_body_html and l_subject fields have in them the garbage that causing ORA error?

    If the call to the procedure of sending (it is a procedure, and not a function) many times is necessary or useful depends on exactly what you're trying to do.

    For example, you can write to Santa for

    • Submit a wish list
    • Change of address
    • Contradiction with your boss, who can you tell Santa you were mean

    or any combination of these grounds.  If you want to send a simple email whenever any of the conditions are met (and not send a when none are met), then you could do something like this:

    DECLARE

    need_to_send BOOLEAN: = FALSE;

    ...

    BEGIN

    ...

    IF wish_list IS NOT NULL

    THEN

    l_body: = l_body | ...

    need_to_send: = TRUE;

    END IF;

    IF old_addresss <> new_address

    THEN

    l_body: = l_body | ...

    need_to_send: = TRUE;

    END IF;

    IF boss_is_a_big_fat_liar

    THEN

    l_body: = l_body | ...

    need_to_send: = TRUE;

    END IF;

    IF need_to_send

    SO - It's the only call to send

    apex_mail. Send...

    In any case, the error message ' ORA-21560: argument 3 sucks...» "is pretty clear: If you have not given a value to everything you're passing as p_body, then you'd better call the procedure.

  • Error in the generator of the ApEx 4 on Edit Page of the article: ORA-06502

    Hello

    We took 4 ApEx (patch 4.0.1.00.03), and have a problem in a single application, where appears the error ORA-06502 character string buffer too small.) This error at bottom of the page this article Page. In addition, point editing the page "settings" section is left blank, so I can't change any settings. It also gives me wrong when creating new items, so I have to copy existing elements and change them from place. This worked until recently, when the mistake is now also displayed in the application itself, and not only in the constructor. This is a page with a tabular presentation and some elements of search filter. After having fill the filter and click on a search button, the error message and tables is not rendered. This happens from time to time, and the 'solution' is to disconnect and return to the application. I'm not 100% sure, but I guess that's the same problem as the error appearing in the report generator. It is certainly not caused by user data.

    So far, I found this:

    While developing the application, we regularly put the generator of the ApEx between French and English. I read that it was a cause of ORA-06502, but that this problem has been resolved in version 4.0.1.00.03. Our problem may still be linked to the multilingual constructor?

    I ask this because we are running other applications in the same environment, ApEx, and they are all very good. So somehow this error in Report Designer is related to this particular application.

    Any ideas?

    Thanks in advance!

    Hello

    (1) no longer this error occurs if you export your application and install it on apex.oracle.com which has 4.0.2?
    (2) do you use point type plug-ins in your application. In 4.0.1 there was a mistake in the generator if too many when installed in this application. Reduce the number of plug-ins type point or better to install 4.0.2.00.07

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Apex Shuttle - ORA-06502

    Hi people,

    I'm using the shuttle of the Apex, but returned the error ' ORA-06502: PL/SQL: digital error or value: character string buffer too small ", when the query returns many rows then 800.»» Where can I change this?
    I enclose the procedure.

    Thanks for the help.

    create or replace PROCEDURE DHTML_SHUTTLE)
    pSQL_1 clob,
    pSQL_2 clob,
    pID_1 varchar2 default '1',
    pID_2 varchar2 default '2'.
    pSort1 varchar2 default 'Y ',.
    pSort2 varchar2 default 'Y ',.
    pFixed1 varchar2 default 'n'.

    pHeight varchar2 default '150'.
    pWidth varchar2 default '150'.
    pImagePrefix varchar2 default v ('IMAGE_PREFIX'),
    pOnClick varchar2 default null,
    pStyle varchar2 default null,
    pFirstImage varchar2 default 'shuttle_top.png '.
    pPreviousImage varchar2 default 'shuttle_up.png '.
    pNextImage varchar2 default 'shuttle_down.png '.
    pLastImage varchar2 default 'shuttle_bottom.png '.
    pRefreshImage varchar2 default 'shuttle_reload.png '.
    pRightAllImage varchar2 default 'shuttle_last.png '.
    pRightImage varchar2 default 'shuttle_right.png '.
    pLeftImage varchar2 default 'shuttle_left.png '.
    pLeftAllImage varchar2 default 'shuttle_first.png '.

    ) as
    l_shuttle_attributes varchar2 (20000);
    Start
    l_shuttle_attributes: = ' multiple = "multiple" style = "height :'|| pHeight | "PX; width :'|| pWidth | "PX; » " ;
    HTP. PRN ("< style >");
    If (pStyle is null) then
    / * style for default shuttles.
    HTP. PRN ('.shuttleSort1 img, .shuttleControl img, .shuttleSort2 img {display: block; cursor: hand; cursor: margin: 3px ;}");})
    on the other
    HTP. PRN (pStyle);
    end if;
    HTP. PRN ("</style > '");
    HTP. PRN ("< table cellpadding ="0"cellspacing ="0"border ="0 "summary =" "> < tr >" ");
    / * Sort orders 1 * /.
    if(pSort1='Y') then
    HTP. PRN ("< class td ="shuttleSort1"> ');
    HTP. PRN ("< img src =" "'| pImagePrefix | pFirstImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ;'|| ("T") pOnClick | ("' alt = 'Top' / >");
    HTP. PRN ("< img src =" "'| pImagePrefix | pPreviousImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ;'|| ("U") pOnClick | ("' alt = 'Up' / >");
    HTP. PRN ("< img src =" "'| pImagePrefix | pNextImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ;'|| ("D") pOnClick | ("" alt = "Low" / > ");
    HTP. PRN ("< img src =" "'| pImagePrefix | pLastImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ('B') ;'|| pOnClick | ("' alt = 'Bottom' / >");
    HTP. PRN ("< table > '");
    end if;
    / * Shuttle point 1 * /.
    HTP. PRN ("< class td"shuttleSelect1"= > ' |") htmldb_item.select_list_from_query (pID_1, null, pSQL_1, l_shuttle_attributes, 'NO', null, null, 'SHUTTLE_': pID_1, 'SHUTTLE_': pID_1, null). "< table >');
    / * Shuttle controls * /.
    HTP. PRN ("< td align ="center "class =" shuttleControl "> ');
    HTP. PRN ("< img src =" "'| pImagePrefix | pRefreshImage |'") onclick = "g_ShuttleMe" | pID_1 | '. reset(); | pOnClick | ("" alt = "reset" / > ");
    if(pFixed1='Y') then
    HTP. PRN ("< img src ="'| pImagePrefix | pRightAllImage |') "onclick =" move_all ('| "')" SHUTTLE_' | pID_1 | " «, » ||'' 'SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" > > "/ >"); "
    HTP. PRN ("< img src ="'| pImagePrefix | pRightImage |) "" onclick = "move ('|) "' SHUTTLE_' | pID_1 | " «, » ||'' 'SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" > "/ >"); "
    HTP. PRN ("< img src ="'| pImagePrefix | pLeftImage |) "" onclick = "delete ('|) "' SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" < "/ >"); "
    HTP. PRN ("< img src ="'| pImagePrefix | pLeftAllImage |) "" onclick = "remove_all ('|) "' SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" < < "/ >"); "
    on the other
    HTP. PRN ("< img src =" "'| pImagePrefix | pRightAllImage |'") onclick = "g_ShuttleMe" | pID_1 | '. move_all() '. pOnClick | "" "alt =" > > "/ >"); "
    HTP. PRN ("< img src ="'| pImagePrefix | pRightImage |) "" onclick = "g_ShuttleMe" | " pID_1 | '. move(); | pOnClick | "" "alt =" > "/ >"); "
    HTP. PRN ("< img src ="'| pImagePrefix | pLeftImage |) "" onclick = "g_ShuttleMe" | " pID_1 | '. remove() '. pOnClick | "" "alt =" < "/ >"); "
    HTP. PRN ("< img src ="'| pImagePrefix | pLeftAllImage |) "" onclick = "g_ShuttleMe" | " pID_1 | '. remove_all() ". pOnClick | "" "alt =" < < "/ >"); "
    end if;
    HTP. PRN ("< table > '");
    / * Shuttle point 2 * /.
    HTP. PRN ("< class td"shuttleSelect1"= > ' |") htmldb_item.select_list_from_query (pID_2, null, pSQL_2, l_shuttle_attributes, 'NO', null, null, 'SHUTTLE_': pID_2, 'SHUTTLE_': pID_2, null). "< table >');
    / * Sort controls 2 * /.
    if(pSort2='Y') then
    HTP. PRN ("< class td ="shuttleSort2"> ');
    HTP. PRN ("< img src =" "|") pImagePrefix | pFirstImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ;'|| ("T") pOnClick | ("' alt = 'Top' / >");
    HTP. PRN ("< img src =" "|") pImagePrefix | pPreviousImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ;'|| ("U") pOnClick | ("' alt = 'Up' / >");
    HTP. PRN ("< img src =" "|") pImagePrefix | pNextImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ;'|| ("D") pOnClick | "" alt = "to the low"(/>'); "
    HTP. PRN ("< img src =" "|") pImagePrefix | pLastImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ('B') ;'|| pOnClick | ("' alt = 'Bottom' / >");
    HTP. PRN ("< table > '");
    end if;
    HTP. PRN ("< /tr > < / table > '");

    HTP. PRN ("< script > '");
    HTP. PRN ('if(!flowSelectArray) {var flowSelectArray = new Array();}' | chr('13') | chr('10'));
    HTP. PRN ("var g_ShuttleMe' |") pID_1 | "= null". Chr('13') | Chr('10'));
    HTP. PRN ("flowSelectArray [' |]") pID_1 | «] = "SHUTTLE_" | "» pID_1 | '";' || Chr('13') | Chr('10'));
    HTP. PRN ("flowSelectArray [' |]") pID_2 | «] = "SHUTTLE_" | "» pID_2 | '";' || Chr('13') | Chr('10'));
    HTP. PRN ('g_ShuttleMe' | pID_1 |) ' = new dhtml_ShuttleObject ("SHUTTLE_" | pID_1 |) "", "SHUTTLE_" | " pID_2 | '");' || Chr('13') | Chr('10'));
    HTP. PRN ("< /script >" | ") chr('13') | chr('10'));
    end;

    The problem that you hit is htmldb_item.select_list_from_query, so tweak that a bit.
    DG tournament, I used my own Shuttle, but never documented it as well, but I found an another blog post that makes.
    Take a look at this solution.

    Just a question; do you really want more than 800 objects in your Shuttle? Is it not more logical to have a drop down menu or something like that before limiting the list?

    Dimitri

  • APEX 5.0. With the image stored in a BLOB gives ORA-06502.

    Hello

    I want to create an interactive report - computer desk with an image that is stored in a BLOB but it a: returnes ORA-06502: PL/SQL: digital or value error: character of number conversion error.

    I created a test with only the image report (charged - which is a BLOB) and an ID (PK - one number from a sequence)

    SELECT ID, invoice of foto

    I tried with and without a formatmask for the ' 999999999999999 ID' and the Type of plain text, because it seems not to be a better choice...

    For the Type 'pay' is 'View Image' and the 'Table name' and 'BLOB column' are defined. 'Primary Key column 1' set ID 'column of Type mime"points to a field that contains" image/jpeg", as the stored image is a photo in format jpg.

    The image from a Forms application displays OK.

    DB is a 11.2.0.4 on Linux 6.6 and APEX is 5.0

    What did I miss?

    Thank you

    Dino

    Dino Hustinx wrote:

    I want to create an interactive report - computer desk with an image that is stored in a BLOB but it a: returnes ORA-06502: PL/SQL: digital or value error: character of number conversion error.

    I created a test with only the image report (charged - which is a BLOB) and an ID (PK - one number from a sequence)

    SELECT ID, invoice of foto

    As described in the documentation, the report query selects the length of the BLOB, not the column itself column:

    select id, dbms_lob.get_length(billed) billed from foto
    
  • apex_json throws ORA-06502

    Hello

    I use 5 APEX and must work with GEOJSON.

    If I test the following statement in SQL Developer, everything works fine:

    DECLARE
        s varchar2(32767) := '{ "a": 1, "b": ["hello", "world"]}';
    BEGIN
        apex_json.parse(s);
        sys.dbms_output.put_line('a is '||apex_json.get_varchar2(p_path => 'a'));
    END;
    

    But if I change the JSON data to the following:

    s varchar2(32767) := '{ "a": 1.1, "b": ["hello", "world"]}';
    

    I get this error:

    Fehler beim Start in Zeile : 1 in Befehl -
    DECLARE
        s varchar2(32767) := '{ "a": 1.1, "b": ["hello", "world"]}';
    BEGIN
        apex_json.parse(s);
        sys.dbms_output.put_line('a is '||apex_json.get_varchar2(p_path => 'a'));
    END;
    Fehlerbericht -
    ORA-06502: PL/SQL: numerischer oder Wertefehler: Fehler beim Konvertieren von Zeichen zu Zahl
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 367
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 519
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 566
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 756
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 774
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 811
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 839
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 852
    ORA-06512: in Zeile 4
    06502. 00000 -  "PL/SQL: numeric or value error%s"
    *Cause:    
    *Action:
    

    The same thing happens with with MyMethod...

    sys.dbms_output.put_line('a is '||apex_json.get_number(p_path => 'a'));
    

    Because I work with GEOJSON, there are decimal numbers in my JSON data - I have to deal with.

    I have not found any suspicion in the apex_json documentation.

    How can I solve this problem?

    Kind regards

    Christian

    Hello

    your example works fine for me on 5.0.2. There were a few bugs that fixed us since 5.0. Some may be available as SAFF, but maybe you need to upgrade to the latest version.

    Kind regards

    Christian

  • ORA-06502: PL/SQL: digital error: error in the conversion of char to number

    Hello world.

    I have a strange problem here. I'll try to explain better. I work with APEX 4.2 and of Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production.

    Here are my parameters NLS_SESSION_PARAMETER and NLS_DATABASE_PARAMETER: NLS_NUMERIC_CHARACTERS,.


    I have a table with a lot of body numbers, and when I imported a MS Access application data, all fields were imported with the comma as decimal separator.


    Now, I have a form with several fields of number and when I leave a numeric field, a body of numbers of amount total is calculated and automatically filled with a bit of javascript.


    Now the problem: calculating fields (sum) succeeds only when I use the decimal as the delimiter. If I use the comma, I get a NaN value in the total amount field. I managed to convert all commas in points with javascript, so the total amount is calculated.

    When I try to save the record, I get the error: ORA-06502: PL/SQL: digital error: error in the conversion of char to number because I'm trying to save the separator point in my number fields.


    I tried to use REPLACE function to replace the. by one, before winning but does not solve the problem.


    This sounds familiar to anyone?


    Thanks in advance.



    OK, the problem is solved people.

    Somehow, the registration procedure had an influence on another calculation of my form and the error came from this process. So I put a to_number and replace stated in the calculation and all records very well and it shows my total.

  • Text editor enriched ORA-06502: PL/SQL: digital or value error: character string buffer too small

    Hello

    I have apex user 4.2.3 with enterprise database edition 11, I page include RICH TEXT EDITOR, when I add data to this text and save it will record successfully and when I try to view this information in another page I see all the data, as expected, the problem when I try to go to the same page as RICH TEXT EDITOR error message apper ORA-06502 : PL/SQL: digital or value error: buffer string too small, I see this link https://forums.oracle.com/thread/2461151?tstart=0 but I don't know how it solve it, the problem is made data at the point of the rich text editor.


    Any suggestion?


    Thank you

    Thanks for the reply,

    Its standard form with text rich field, my question she same as link above I added before

  • Error processing request. ORA-06502: PL/SQL: digital error or value OK

    Hello

    I want to open a session in an APEX application using the IE 8 browser, but I can't because this error:

    https://naa-vm02.us.oracle.com:7510/i/error.gifErrorError processing request.
    ORA-06502: PL/SQL: digital error or value
    Ok

    I can run this app with Chrome or Mozilla, but I need to open it with IE.

    Can you please tell me how should I solve this problem?

    Thank you

    It is a problem with your version of APEX that you use... There was a patch released about 6 months ago... or you can just upgrade to the latest version. I also had this problem, and there are several similar topics in this forum about the exact problem and at least the a precise details on the patch/fix.

  • Ideas for work around ORA-06502: character string buffer too small on the interactive report

    Hello

    It comes to Apex 4.2.  We try to create an interactive report.  The report is for something similar at a follow-up time.  We try to concat a comments column as the sum of the hours.  For example,.

    Select TASK_NAME, sum (HOURS), to_char (XMLAGG (XMLELEMENT(E,E.COMMENTS ||) ' : ')). Extract ('//Text ()'). GETSTRINGVAL()) USER_COMMENTS of...

    This query works fine if we seek only to a window of 1 week.  The question that we live, when we expand the scope of the query to include data from 3 months, we hit ORA-06502 interactive report.  If we remove this column from the interactive report, then the report works very well.

    Anyone has any ideas on how we might be able to work around this problem?  I'm guessing we're reached the limit of 32 k on the report.  Ideally, we would show just the last X number of comments and then have a link to show all comments

    Any help would be appreciated

    Thank you

    Mike

    ListAGG raises an ORA-01489 for varchar2 > 4000 bytes

    OP has an ORA - 06502--> IR is running within a limit of 4 k / 32 k.

    quick fix: wrap USER_COMMENTS ListAGG in a substr (..., 1, 4000)

    Longer solution, use a subquery to modify comments based on ROW_NUMBER() (IE after the nth line, change the null)

    with
    -- simulating data
    t as (select task_id, sysdate - lv as date_entered
      ,round(dbms_random.value(1,24)) hours
      , '-*' || lv || '.' || task_id || '*-' as user_comments
    from ( select level as task_id from dual connect by level <=10 ), (select level lv from dual connect by level < 1000)
    ),
    -- modify data
    modified_data as (
      select task_id, hours, date_entered
        ,case
          when row_number() over (partition by task_id order by date_entered desc) < 5
            then user_comments
          else null
         end USER_COMMENTS
        from t)
    select task_id, sum(hours) total_hours,
      listagg( user_comments  ) within group (order by date_entered desc)
      || case when count(*) >= 5 then '! MORE COMMENTS !' else null end
        as user_comments
    from modified_data
    group by task_id;
    
  • Error ORA-06502 in DBMS_LOB. READ

    I am generating XML by use of DBMS_XMLGEN.getxml pakage and exit I store in a CLOB. Then, I read the value of the CLOB object by use of DBMS_LOB. READ for each count 32767 data. Here is my code. My LOB total length is 450755. In the loop, when it reached 393205, I get the error below.

    ORA-06502: PL/SQL: digital or value error: character string buffer too small
    DECLARE
        v_xml_clob     CLOB := EMPTY_CLOB();
    
        v_lob_length   INTEGER;
        v_index        INTEGER := 1;
        v_read_cnt     INTEGER;
        v_chunk        VARCHAR2(32767);
    
    BEGIN
        o_ret_code := 0;
    
        SELECT  DBMS_XMLGEN.getxml ('SELECT OBJECT_NAME, OBJECT_TYPE FROM DBS_OBJECTS')
            INTO    v_xml_clob
            FROM    DUAL;
    
        v_lob_length  := NVL(DBMS_LOB.getlength(v_xml_clob),0);
        DBMS_OUTPUT.PUT_LINE('LOB Length : '||v_lob_length);
    
        v_index       := 1;
    
        -- Start to read the data from CLOB object
        WHILE v_index <= v_lob_length
        LOOP
            DBMS_OUTPUT.PUT_LINE('IN');
            v_read_cnt   := 32767;
            DBMS_LOB.read (
                        v_xml_clob,
                        v_read_cnt,
                        v_index,
                        v_chunk
                        );
    
            -- USe fnd_file.put function to place the XML data into concurrent view output
            fnd_file.put(fnd_file.output,v_chunk);
            DBMS_OUTPUT.PUT_LINE('v_index Start: '||v_index);
            v_index := v_index + v_read_cnt;
            DBMS_OUTPUT.PUT_LINE('v_index End: '||v_index);
        END LOOP;
    
    EXCEPTION
    WHEN OTHERS
    THEN
        ROLLBACK;
        NULL;
    END;
    Please let me know what can be the problem

    Thank you

    Hello

    I'm partly guessing here. You read from a CLOB, which means that you read 32,767 characters, not bytes.

    These 32,767 characters you load into a (probably) 32767 bytes length varchar2 variable. If you use a multibyte character set you could get more than 32767 bytes in a reading.

    Concerning
    Peter

  • error report: ORA - 06502:character too small string buffer. urgent!

    Hi guys,.
    My version of the APEX is 3.0.1.00.08, my application run on my test environment, but on the PROD environment, she raised the error:
    error report:
    ORA-06502: PL/SQL: digital or value error: character string buffer too small

    On this page, on the left is a tree, the right side is a tabular presentation, when I click on a tree node, it will pass the id of the current node to the form and the form shows data from children. When I click on a tree node, it triggers the ORA-06502 error, but when click on some other nodes, it is correct. I don't know why. And on my test environment, it does not have this error, the test environment has same version with the prod environment, has only less data in the database. Could you help me?
    I searched in the forum, someone said it's LOV problem, if there is problem LOV, all nodes must have the error, why click on some nodes are ok?

    Thank you!

    Jessica

    I don't know, but why do you need a semicolon at the end of the SQL?

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • upgrade to 12 c causing problems with APEX 4.2.5

    Hey everyone, our dba updated our database this past weekend at 12 c.  Today, we have problems with one of our more complex pages.  Here's our software configuration where after upgrade:

    APEX: Application Express 4.2.5.00.08

    Database: Oracle Database Enterprise Edition Release 12.1.0.2.0 - 64 bit Production 12 c

    The page in question has dynamic actions which fire when a user clicks a button.  The action has 3 processes related to it.  The first is javascript that runs that changes some css classes.  That seems to work.  The second is supposed to be executing pl/sql code (with a dynamic process page element).  This does not appear be to fire.  I watched with firebug and chrome dev tools, but it seems that no ajax call is sent when I click on the button.

    The page seems to generate exceptions in the scenes.  I see the following in newspapers several times on the page.

    ORA-20987: APEX - ORA-00001: unique constraint (APEX_040200.WWV_FLOW_COLLECTIONS_UK) violated

    Unfortunately, I can't determine if what is happening on the loading of the page or under dynamic actions.  Apparently not loading the linked page cause I can't recreate it all by refreshing the page.  But I don't see how it could be created by the dynamic action since they don't seem to be calling the server either.  (no ajax call I see)

    Does anyone know of none known between 4.2.5 and 12 c?  Everything worked well Fri/Sat, so the upgrade must be the cause.

    Thank you!

    It looks like given the scope of the implemented dynamic actions in dynamic instead of static electricity was the problem.  Their transition to static seems to have fixed everything.  Not sure if it "just worked" under the previous version and 12 c was somehow more special or if the parameter got reversed somehow in the process, but it was certainly before.

    Well.  I'll consider it fixed!

Maybe you are looking for

  • @Loner TCant boot Windows after the OS disk partitioning

    PLEASE PLEASE PLEASE HELP ME Problem is on my MacBook Pro (13-inch, mid-2012) Running OS X El Capitan 10.11.6 Summer read your responses on other threads of hours but I can't seem to fix mine. I just tried to do my small MAC drive through disk utilit

  • Apple tip of pencil rubber

    Hello I really like the Apple pencil that is used with the iPad Pro to sketch or drawing.  My issue is more with the tip of the pencil Apple, which sometimes is kind of clunky when I sketch. I think it's too smooth on the top of the glass of the iPad

  • I can't stop slide show of Photos showing the file name at the beginning?

    I made a slideshow for a crowdfunding charity event, but the Organizer is hampered by the fact that the file name displayed in large characters, hiding part of the actual text, when the slideshow begins to play. I can't find anything in the controls

  • Webcam does not work in my Satellite A200 - 1 CG

    Hi @ all,I bought my toshiba satellite a200 - 1 cg this week and the built-in webcam does not work. so my question: is there any software for the cam integrated to download for psae3-series? I found only the a210 as drivers and the psae0 a200? but th

  • aperiture on powershot sx50 hs

    I tried my knowledge from my camera.  I want to be able to control the shutter and aperture on my camera.  I have a very narrow control band now, essentially F4.0 at F8.0.  I'm doing something wrong?  Have I not the wrong camera for what I want to do