ORA-06502 error digital or value of PL/SQL.

Hi experts,

Oracle Apex 4.2, 11g database, using windows 7.

I created a form and trying to create automatically generated # (sequence of not) with logic and SQL.

My requirement is to generate the good good exercise only and exercise begin from 01 July and ends 30 June each year. This means if the 07/01/2015 start it will create a new voucher No.

The table name is GL_PV and the columns are:

Number of PV_No

Date of PV_Date

Number of CC_code

number amount

Remarks varchar2 (100)

What I did: -.

Created a process to submit before the calculations and validations.

Code are

IF TO_NUMBER (TO_CHAR (: P15_pv_date, 'MM')) < = 6 THEN

SELECT MAX (to_number (nvl(pv_no,0))) + 1

IN: P15_pv_no

OF GL_PV

WHERE pv_date

BETWEEN

TO_DATE ('01 - JUL' |) ' -'|| (TO_NUMBER (TO_CHAR(:P15_pv_date,'YYYY'))-1), 'DD-MON-YY')

AND

TO_DATE (30 - JUN'|) ' -'|| To_char(:P15_pv_date,'YYYY'), 'DD-mon-YY')

and cc_code =: P15_cc_code;

ON THE OTHER

SELECT MAX (to_number (nvl(pv_no,0))) + 1

IN: P15_pv_no

OF GL_PV

WHERE pv_date

BETWEEN

TO_DATE ('01 - JUL' |) ' -'|| To_char(:P15_pv_date,'YYYY'), 'DD-mon-YY')

AND

TO_DATE (30 - JUN'|) ' -'|| (TO_NUMBER (TO_CHAR(:P15_pv_date,'YYYY')) + 1), 'DD-MON-YY')

and cc_code =: P15_cc_code;

END IF;

If: P15_pv_no is null then

: P15_pv_no: = 1;

end if;

and press the button when Conditions = Generate_Button

I have the default assign to pv_date = sysdate, when I launched the point Pv_date form shows the current date and I click on Generate_button now show error.

Error ORA-06502 PL/SQL digital or value. Conversation number character.

One last thing, I checked this code already in TOAD, type I assigned as DATE-value = 10/11/2014 (today's date) works fine without error.

Please guide what this evil is stated.

Best regards

: P15_pv_date is probably not a date but a varchar2 in Apex

Try this

NVL SELECT (MAX (to_number (nvl(pv_no,0))) + 1, 1)

IN: P15_pv_no

OF GL_PV

WHERE pv_date

BETWEEN to_date (' 01-07-' |) (extract (year of to_date (: P15_pv_date, "dd-mm-yyyy")) + case when extracted (months to_date (: P15_pv_date, "dd-mm-yyyy")))<= 6="" then="" -1="" else="" 0="" end="" ),="" 'dd-mm-yyyy'="">

AND to_date (30 - 06-' |) (extract (year of to_date (: P15_pv_date, "dd-mm-yyyy")) + case when extracted (months to_date (: P15_pv_date, "dd-mm-yyyy")))<= 6="" then="" 0="" else="" 1="" end="" ),="" 'dd-mm-yyyy'="">

and cc_code =: P15_cc_code;

Tags: Database

Similar Questions

  • ORA - 06502:numeric or of value errORA-04088: error during execution of trigger

    I received the following error message by entering a number in the maximum value (i.e. 9 999 999.) allowed in a data entry form that is distinct from the basic form:

    ORA-06502: PL/SQL: digital or error number precision value: ORA-06512 too big: "< owner >. < trigger >", line 194 ORA-04088: error during execution of trigger '< owner >. < trigger >.

    Where < owner > is the schema name and < Trigger > is the name of the trigger. The block of data in the application for participation is based on a database table, and the sum of all the values entered (with a maximum value of 99.999.999.) appears in the form of Basic. A grand total of this amount along w / other totals on the basic shape is also displayed with a maximum value defined as 999 999 999. Only, I get the above error message when the total is greater than 99999999. If the total is less than or equal to 99.999.999, the basic form works very well. Why?

    I checked all the attributes of the database columns and form fields and everything seems to be okay, and I'm out of my mind. I desperately need your help to solve this problem quickly because the pressure is on...

    Thanks in advance for any help.

    Orchid says:
    Hello Hamid,

    Thanks for your help. Yes, it works as suggested, after that I have increased the length of NUMBER data base table column (9) to NUMBER (11).

    gives you the correct answer, and you don't mark it ;)

    >

    Apparently, Oracle database truncates the decimal points and only update the value of 9 digits without giving errors, but the form of Oracle application is more picky and it generates forms and Oracle error messages when you run the application. It seems that there is a difference when executing the sql commands in the Oracle database and execution of these Oracle Forms application controls. Do you agree?

    Yes

    Thanks again for all the help.

    You can only give reward for it by checking the useful and correct answer.

  • PL/SQL error: digital or value error: character string buffer too small

    HI gurus of the oracle,.

    I'm new to PL/SQL,

    my version of oracle's oracle 11g.

    I create a procedure to insert data from flat file to a table using UTL_FILE.

    The table is

    CREATE TABLE EXT_PERSON_INFO

    (

    ID_PERSON NUMBER (38),

    ID_BATCH NUMBER (38),

    ID_PERSON_NBR VARCHAR2 (3 BYTE),

    ID_AREA VARCHAR2 (5 BYTE),

    NM_FINAL VARCHAR2 (20 BYTE),

    NM_START VARCHAR2 (20 BYTE),

    DATE OF DT_DOB,

    ID_SERIAL VARCHAR2 (BYTE 9),

    DATE OF DT_RESPONSE,

    TRANS_TYPE VARCHAR2 (2 BYTE),

    REG_RESPONSE VARCHAR2 (1 BYTE),

    TM_RX TIMESTAMP (6)

    )

    My procedure is

    CREATE OR REPLACE PROCEDURE PROC_PERSON

    IS

    f_line VARCHAR2 (2000);

    f utl_file.file_type;

    f_dir VARCHAR2 (250);

    fname VARCHAR2 (50);

    F_ID_PERSON EXT_PERSON_INFO.ID_PERSON%type: = 1;

    F_ID_BATCH EXT_PERSON_INFO.ID_BATCH%type: = 1;

    F_ID_PERSON_NBR EXT_PERSON_INFO.ID_PERSON_NBR%type;

    F_ID_AREA EXT_PERSON_INFO.ID_AREA%type;

    F_NM_FINAL EXT_PERSON_INFO. Type of NM_FINAL %;

    F_NM_START EXT_PERSON_INFO. Type of NM_START %;

    F_DT_DOB EXT_PERSON_INFO. Type of DT_DOB %;

    F_ID_SERIAL EXT_PERSON_INFO.ID_SERIAL%type;

    F_DT_RESPONSE EXT_PERSON_INFO. Type of DT_RESPONSE %;

    F_TRANS_TYPE EXT_PERSON_INFO. Type of TRANS_TYPE %;

    F_REG_RESPONSE EXT_PERSON_INFO. Type of REG_RESPONSE %;

    BEGIN

    fname: = "D:\raj\raj.txt";

    f: = utl_file.fopen('RAJ',fname,'r');

    loop

    Start

    UTL_FILE.get_line (f, f_line);

    exception

    When no_data_found then

    "exit";

    end;

    F_ID_PERSON: = 1;

    F_ID_BATCH: = 1;

    F_ID_PERSON_NBR: = substr (f_line, 1, 3);

    F_NM_FINAL: = substr (f_line, 4, 22);

    F_NM_START: = substr (f_line, 23, 34);

    F_DT_DOB: = substr (f_line, 35, 44);

    F_ID_SERIAL: = substr (f_line, 45, 48);

    F_DT_RESPONSE: = substr (f_line, 49, 58);

    F_TRANS_TYPE: = substr (f_line, 59, 60);

    F_REG_RESPONSE: = substr (f_line, 61, 61);

    F_ID_AREA: = substr (f_line, 62, 64);

    insert into EXT_PERSON_INFO VALUES (F_ID_PERSON, F_ID_BATCH, F_ID_PERSON_NBR, F_ID_AREA, F_NM_FINAL, F_NM_START, F_DT_DOB, F_ID_SERIAL, F_DT_RESPONSE, F_TRANS_TYPE, F_REG_RESPONSE);

    end loop;

    UTL_FILE.fclose (f);

    commit;

    end;

    /

    am getting error

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

    Please help me in this regard. Impossible to trace the issue.

    Thanks in advance

    Kind regards

    REDA

    The error message should include a line number to reference your code to see what line the error occurred on.

    That said, look at the documentation for SUBSTR as you incorrectly use the third parm.  It's length, no end of race.  That's your problem.

  • ORA-06502 error writing to PDF file

    Oracle 10.1.2.0.8

    I'm trying to create a procedure from pl/sql that will dump a bunch of pdf files stored in BLOBs on disk. It runs on a windows machine. In order to avoid line breaks, I use htp.prn.

    When I run the following procedure, I get the error:

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

    If I comment on htp.prn (utl_raw.cast_to_varchar2 (l_buffer)); then the error disappears.

    I tried to use smaller buffers sizes but I still get the same error.

    Any thoughts are appreciated.


    PROCEDURE EXPORT_APNDX_FILES
    IS
    lv_code NUMBER; -used for the treatment of exceptions
    lv_errm VARCHAR2 (64); -used for the treatment of exceptions
    lv_err1 VARCHAR2 (120); -used for the treatment of exceptions
    lv_err2 VARCHAR2 (120); -used for the treatment of exceptions

    l_file UTL_FILE. TYPE_DE_FICHIER;
    l_buffer RAW (32767).
    l_amount directory: = 32767;
    l_pos INTEGER: = 1;
    l_blob BLOB;
    l_blob_len INTEGER.

    BEGIN
    -Get LOB locator
    SELECT studyapndx_fileobj
    IN l_blob
    Of er_studyapndx
    WHERE rownum = 1; -<-first file is a pdf file

    l_blob_len: = DBMS_LOB.getlength (l_blob);

    -Open the destination file.
    l_file: = UTL_FILE.fopen ("BLOBS", "file.PDF ', 'w', l_amount");

    HTP.init;
    owa_util.mime_header (' application/pdf');

    -Pieces of the BLOB to read and write to the file
    -full up.
    While l_pos < l_blob_len LOOP
    DBMS_LOB. Read (l_blob, l_amount, l_pos, l_buffer);
    HTP. PRN (utl_raw.cast_to_varchar2 (l_buffer)); -<-mistake here
    l_pos: = l_pos + l_amount;
    END LOOP;

    -Closes the file.
    UTL_FILE.fclose (l_file);

    EXCEPTION
    WHILE OTHERS THEN
    -Close the file if something goes wrong.
    IF UTL_FILE.is_open (l_file) THEN
    UTL_FILE.fclose (l_file);
    END IF;

    lv_code: = SQLCODE;
    lv_err1: = SUBSTR (SQLERRM, 1, 120);
    lv_err2: = SUBSTR (SQLERRM, 121, 240);
    DBMS_OUTPUT. Put_line ('Error Code' | lv_code |) ': ' || lv_err1);
    DBMS_OUTPUT. Put_line ('Error Code' | lv_code |) ': ' || lv_err2);

    END; -Procedure

    Change the file mode of text ('w') in binary ("wb") might be enough to allow the put_raw procedure work properly without incorporation of unintentional line breaks. Mode text on a windows machine, file IO routines know that the lines of the text file are completed by a CRLF combination, and it automatically adds the LF when missing essentially converted what he considers an end to end of line CRLF windows line CR style unix style. Binary mode should not do as it possible now that a CR character is not necessarily a line break.

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

  • ORA-06502 when you use MAX (Column) with % TYPE

    Hello

    I tried to limit the problem as much as I can and have managed to isolate a particular scenario. As the structure and sensitive data, I had to come up with a scenario that I tested it and it causes the same problem occurs. The scenario is as follows

    Assuming that I have a table defined as follows

    CREATE TABLE TEST_TABLE (TEST_COLUMN CHAR (8 BYTES));

    and the table has only one record NZ07100S

    We also define a function as

    CREATE OR REPLACE FUNCTION
    FUNCTION GETTESTVALUE
    TEST_TABLE RETURN. TYPE % TEST_COLUMN
    IS
    TEST_VALUE TEST_TABLE. TYPE % TEST_COLUMN;
    BEGIN
    SELECT MAX (TEST_COLUMN) IN TEST_VALUE TEST_TABLE;
    RETURN TEST_VALUE;
    END;



    We ran the following command

    SELECT GETTESTVALUE FROM DUAL;

    and receive an error as follows

    Error report:
    SQL error: ORA-06502: PL/SQL: digital or value error: character string buffer too small
    ORA-06512: at "GETTESTVALUE", line 6
    06502 00000 - "PL/SQL: digital error or the value of %s.


    However, if were to change the function of the following

    CREATE OR REPLACE FUNCTION
    FUNCTION GETTESTVALUE
    TEST_TABLE RETURN. TYPE % TEST_COLUMN
    IS
    TEST_VALUE TEST_TABLE. TYPE % TEST_COLUMN;
    BEGIN
    SELECT TEST_COLUMN IN TEST_VALUE TEST_TABLE;
    RETURN TEST_VALUE;
    END;

    There is no error reported and the value nz07100s is returned.

    Of course, when we changed the function is

    CREATE OR REPLACE FUNCTION
    FUNCTION GETTESTVALUE
    TEST_TABLE RETURN. TYPE % TEST_COLUMN
    IS
    TEST_VALUE TEST_TABLE. TYPE % TEST_COLUMN;
    BEGIN
    SELECT CAST (MAX (TEST_COLUMN) AS CHAR (8)) IN TEST_VALUE TEST_TABLE;
    RETURN TEST_VALUE;
    END;

    No error is reported, and the value is returned

    However, the function in question is in the use of production since 2004. We are currently a few changes to the application and imported the backup of Oracle 10 g Oracle XE. When we try to run the function, the error is thrown.

    I would like to understand if this is a limitation with Oracle XE that causes this problem. It seems to me that the problem is to select the MAX value in the variable that has been set. Executing the query directly from sqlplus does not generate an error, and therefore do not feel there is an error with the SQL code. The only time that we can't get the error is with the INTO statement.

    Is there a way to use the function as it has been defined in production? Why the ORA-06502 error would be thrown? It does not seem to make sense to me. Would appreciate any guidance on this.


    Thanks and greetings

    Jega

    Thank you

    What happens if you do this and rerun the select

    SQL>alter table test_table modify test_column varchar2 (8 byte);
    

    Edit:
    You may need to open a SR with Oracle on this one
    (Really, financial system on XE?)

    Concerning
    Peter

    Published by: Peter on March 4, 2009 12:58 AM

  • ORA-01821: date format not recognized in PL/SQL report - 4.0

    Hello


    I use Apex 4.0 and I have a classic report (return of function application) which allows you to select a date column.
    The query runs in the background and gives the result.

    But when I run the report on the page, I get the error
     report error:
    ORA-20001: Error fetching column value: ORA-01821: date format not recognized
    The values for the column are like this 14-MAR-13, 01-FEB-13, etc... Everything seems to be good.

    But I don't know why this error occurs.

    Thank you
    Adkins

    Divya says:

    Yes, this is a database column, and the data type is Date.

    The I used to convert the format is to_date(inv_date,'dd-mm-yy').

    My format of the Date of the application is "DD-MON-YYYY '.

    If the column type is date, then DO NOT use to_date. To format the date, either use the format column (which is strongly recommended) or to_char mask in the query:

    to_char(inv_date, 'dd-mm-yy')
    

    It is not recommended the use of the 2-digit year formats.

  • While the BLOB conversion of type CLOB error - ORA-06502: PL/SQL: digital error or value

    Passing data from attachment of DB (Blob data Type) after the CLOB data type conversion, giving the error "ORA-06502: PL/SQL: digital error or value" in the PL/SQL package. If the BLOB size 32K > it will give another error works great my procedure.

    For example, I enclose my code here.

    function get_base64 (p_blob_in in blob) return clob is

    CLOB v_clob;

    CLOB v_result;

    whole v_offset;

    v_chunk_size PLS_INTEGER: = 12288;

    v_buffer_varchar varchar2 (32767).

    v_buffer_raw raw (32767).

    Start

    fnd_file.put_line (fnd_file.log, 'here');

    If p_blob_in is null then

    Returns a null value.

    end if;

    DBMS_LOB.CREATETEMPORARY (v_clob, true);

    fnd_file.put_line (fnd_file.log, 'here1');

    v_offset: = 1;

    fnd_file.put_line (fnd_file.log, 'Loop value'-| ceil (DBMS_LOB.) GetLength (p_blob_in) / v_chunk_size));

    because me in 1... ceil (DBMS_LOB. GetLength (p_blob_in) / v_chunk_size) loop

    DBMS_LOB. Read (p_blob_in, v_chunk_size, v_offset, v_buffer_raw);

    v_buffer_raw: = utl_encode.base64_encode (v_buffer_raw);

    v_buffer_varchar: = utl_raw.cast_to_varchar2 (v_buffer_raw);

    DBMS_LOB. WriteAppend (v_clob, length (v_buffer_varchar), v_buffer_varchar);

    v_offset: = v_offset + v_chunk_size;

    end loop;

    fnd_file.put_line (fnd_file.log, 'Out of the loop');

    v_result: = v_clob;

    fnd_file.put_line (fnd_file.log, 'V_result length' - |) DBMS_LOB. GetLength (v_result));

    fnd_file.put_line (fnd_file.log, 'V_result' - | v_result);

    DBMS_LOB.freeTemporary (v_clob);

    Return v_result;

    exception

    while others then

    fnd_file.put_line (fnd_file.log, 'Error based on the encode_base64' - |) SQLERRM);

    Returns a null value.

    end;

    In my main program I call this function as below:

    Main proceedings...

    l_return_clob CLOB.

    Begin

    ....

    l_return_clob: = get_base64 (p_blob_in);

    -In returning it gives error - ORA-06502: PL/SQL: digital error or value

    end;

    Then, please mark the thread ANSWERED.

  • ORA-06502: PL/SQL: digital error or the value in the conversion for a long TIME on the CLOB type

    Hello

    I have an EA of RDBMS Oracle 11.2.0.4.

    I ger the following error when I try to convert a data type LONG to type CLOB data thanks to a PL/SQL procedure:

    declare
    v_prefix varchar2 (20): = null;
    v_text_view_clob clob: = null;
    long v_text_view_long: = null;

    cursor c_v
    is
    Select
    a.view_name as view_name
    Of
    USER_VIEWS one;

    Start
    for r_v in c_v
    loop
    Start
    v_text_view_clob: = null;
    v_text_view_long: = null;

    -Do the SQL code of the view
    Select
    a.Text text
    in
    v_text_view_long
    Of
    USER_VIEWS one
    where
    a.view_name = r_v.view_name;

    v_text_view_clob: = v_text_view_long;

    update of ohibo_views one
    set
    a.view_text = v_text_view_clob
    where
    a.view_name = r_v.view_name;
    exception
    while others then
    dbms_output.put_line ('View =' | r_v.view_name |) "kan niet worden geconverteerd!");
    dbms_output.put_line (substr (sqlerrm, 1, 60));
    end;
    end loop;
    -commit;
    exception
    while others then
    lift;
    end;
    /

    I get the error a specific record:

    View = VER_POLISMUTATIES_VW kan niet worden geconverteerd!

    ORA-06502: PL/SQL: digital error or value

    At looked the origina; Value of type LONG and it is indeed a "long" piece of text.

    However, CLOB has a restriction about 4G * db_block_size and LONG 2 G - 1 according to the documentation.

    I should be able with the method above to convert a LONG in CLOB.

    Anyone had a similar situation?

    Thanks in advance for advice how to solve.

    Kind regards

    PS: my apologies, I didn't know which group to post this discussion: database or PL/SQL.

    Good indeed, a link with the right explanation.

    I didn't know that there was such a function.

    Thank you!

    Kind regards

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

  • ORA-06502: PL/SQL: digital or value error: character string buffer too small in the functions

    Hi all

    FUNCTION to CREATE or REPLACE fnc_two (p_in_job IN VARCHAR2)

    RETURN VARCHAR2

    AS

    CUR CURSOR

    IS

    SELECT ename

    WCP

    WHERE job = p_in_job;

    v_first_name emp.ename%TYPE;

    BEGIN

    FOR my heart IN rec

    LOOP

    IF v_first_name IS NULL

    THEN

    v_first_name: = rec.ename;

    ON THE OTHER

    v_first_name: = v_first_name | ',' || Rec.Ename;

    END IF;

    END LOOP;

    RETURN v_first_name;

    END;

    SQL > SELECT fnc_two ('CLERK')

    2 FROM dual;

    SELECT fnc_two ('CLERK')

    *

    ERROR on line 1:

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

    ORA-06512: at the 'APPS '. FNC_TWO', line 17

    SQL > select distinct work of emp

    2.

    JOB

    ---------

    CLERK

    SELLER

    PRESIDENT

    MANAGER

    ANALYST

    v_first_name: = v_first_name | ',' || Rec.Ename;

    The above statement is the original error. The value has been assinged to v_first_name is larger than the computer can handle.

    Increase the size of the variable v_first_name to avoid the error example

    v_first_name varchar2 (100);

  • 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

  • ORA-06502: PL/SQL: digital error or value

    Hello

    We have a package with a cursor that returns the session information:

    create or replace 
    PACKAGE BODY             "LOGIN_AUDIT" 
    ...
    ...
      CURSOR session_cur IS
        SELECT * FROM v$session WHERE audsid=USERENV('sessionid');
    
     session_rec session_cur%ROWTYPE;
    
    ...
    
    FUNCTION get_osuser
        RETURN VARCHAR2
      IS
      BEGIN
        RETURN session_rec.osuser;
      END;
    
    FUNCTION get_dbuser
        RETURN VARCHAR2
      IS
      BEGIN
        RETURN NVL(session_rec.username, 'ORACLE_SYS');
      END;
    
    ...
    

    The package compiled successfully and works ok out for a function that is the get_osuser. When you launch sqlplus, we get the following error:

    Select double LOGIN_audit.get_osuser;

    *

    ERROR on line 1:

    ORA-06502: PL/SQL: digital error or value

    ORA-06512: at "APPUSR. LOGIN_AUDIT', line 94

    ORA-06512: at "APPUSR. LOGIN_AUDIT', line 102

    The APPUSR has select priv on V$ SESSION and a select * from v$ session returns the session information. We can perform any other function since the package without any problem, for example:

    APPUSR@APPD > select double login_audit.get_dbuser;

    GET_DBUSER

    -------------------------------------------------------------

    APPUSR

    Can someone help us work on what happens please.

    PS Oracle: 11.2.0.3, OS Windows 2008 server.

    Thank you

    Really I have not aside, this and raise the question?

    Why you write all this code?

    wouldn't the following very good enough?

    1. FUNCTION get_osuser RETURN VARCHAR2;                    Use sys_context ('USERENV', 'OS_USER')
    2. FUNCTION get_dbuser RETURN VARCHAR2;                    Use sys_context ('USERENV', 'SESSION_USER')
    3. FUNCTION get_client_info RETURN VARCHAR2;                   Use sys_context ('USERENV', 'CLIENT_INFO')
    4. FUNCTION get_module_info RETURN VARCHAR2;               Use sys_context ('USERENV', 'MODULE')
    5. FUNCTION get_action_info RETURN VARCHAR2;                  Use sys_context ('USERENV', 'ACTION')

    Just do not know, I see the advantage of messing around with this slider and have to fight with the updating of information and others.

    This would totally work around the error you get and probably accelerate - and make it easier to maintain.

    ??

    Unless there is some additional requirements, that I'm missing

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

  • ORA-06502: PL/SQL: digital or value error: character string buffer too smal

    Hi experts,


    Please check my query

    DECLARE
    f utl_file.file_type;
    s NVARCHAR2 (32000);
    VARCHAR2 (10) F1;
    F2 char (1);
    F3 VARCHAR2 (100);
    F4 VARCHAR2 (100);
    F5 VARCHAR2 (100);
    F6 DATE;
    F7 DATE;
    F8 DATE;
    F9 DATE;
    F10 DATE;
    F11 char (1);
    BEGIN
    DBMS_OUTPUT. ENABLE (100000);
    f: = utl_file.fopen ('MID5010_DOC1TP', 'OPT_CM_BASE.txt', 'R');

    LOOP
    BEGIN
    UTL_FILE. GET_LINE (f, s);

    F1: = REGEXP_SUBSTR (s, "[^ |]") +', 1, 1);
    F2: = REGEXP_SUBSTR (s, "[^ |]") +', 1, 2);
    F3: = REGEXP_SUBSTR (S, "[^ |]") +', 1, 3);
    F4: = REGEXP_SUBSTR (S, "[^ |]") +', 1, 4);
    F5: = REGEXP_SUBSTR (S, "[^ |]") +', 1, 5);
    F6: = REGEXP_SUBSTR (S, "[^ |]") +', 1, 6);
    F7: = REGEXP_SUBSTR (S, "[^ |]") +', 1, 7);
    F8: = REGEXP_SUBSTR (S, "[^ |]") +', 1, 8);
    F9: = REGEXP_SUBSTR (S, "[^ |]") +', 1, 9);
    F10: = REGEXP_SUBSTR (S, "[^ |]") +' 1, 10);
    F11: = REGEXP_SUBSTR (s, "[^ |]") +', 1.11);

    insert into OPTUM_ICD10CM_BASE
    (OF THE CODE
    STATUS,
    SHORT_DESCRIPTION,
    LONG_DESCRIPTION,
    FULL_DESCRIPTION,
    CODE_EFFECTIVE_DATE,
    CHANGE_EFFECTIVE_DATE,
    TERMINATION_DATE,
    RELEASE_DATE,
    CREATION_DATE,
    VALIDITY)
    VALUES (F1,
    F2,
    F3,
    F4,
    F5,
    F6,
    F7,
    F8,
    F9,
    F10,
    F11);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
    END LOOP;

    UTL_FILE. FCLOSE (F);
    END;
    ------------

    and format text as below


    A50.0 | Short | Long | Full | 01/01/2009 | / 01/2009 | 01/01/2013. 18/09/2012 | C |
    A50.1 | Short | Long | Full | 01/01/2009 | 01/01/2009 | 001-2013 | 18/09/2012 | C |
    A50.2 | Short | Long | Full|01-01-2009|01-01-2009|67|01-01-2013|09-18-2012| C |
    A50.3 | Short | Long | Full | 011-2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A50.4 | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | 5.
    A50.5 | R | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A50.6 | Short | Long | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A50.7 | Short | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    2345. Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.0 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.1 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.2 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.3 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.4 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.5 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.6 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.7 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.8 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A60.9 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A70.0 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A70.1 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A70.2 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A70.3 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A70.4 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    B222 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.1 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.2. N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.3 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.4 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.5 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.6 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.7 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.8 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A4.9 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A5.0 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A5.1. N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A5.2. B: Short | Long | Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012| C |
    A5.3 | B: Short | Long | Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012| C |
    D642 | B: Short | Long | Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012| C |
    A5.5 | B: Short | Long | Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012| C |
    A5.6 | B: Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A5.7 | C | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A001 | C | Short update | Long update | Full update | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A009 | C | Short update | Long update | Full update | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A5.10. C | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A0109 | C | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.0 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.1 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.2 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.3 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.4 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.5 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.6 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    F10.7 | N | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A30 | C | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A316 | C | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |
    A317 | C | Short | Long | Full | 01/01/2009 | 01/01/2009 | 01/01/2013. 18/09/2012 | C |


    but I make an error such as ORA-06502: PL/SQL: digital or value error: character string buffer too small

    Please help me

    See now, you really have to think carefully, the code of operation step by step. Then you could help you.

    I told you to use a when others share to block emergency inside the LOOP and you that has changed in the external main block! Why?

    Simply change and recheck.

Maybe you are looking for

  • Mail, Spotlight search, remove junk mail does not

    I checked all the possible solutions, and nothing helps. Junk e-mail is to stay within the box Junk mailbox. Nothing can not search in mail / Spotlight.

  • Messenger

    como o increase limit messages no Messenger

  • Measure Performance

    Hello everyone. Recently, I tried to optimize my application as it can consume about 50% of the processor when it runs. One of the things that my program is to display data on a set of indicators and other controls. I noticed that when there was no d

  • HP1102w: Printer does not appear as an option on MacBook 2014 wireless / Yosemite

    I have configured my 1102w successfully (printed page config and everything is ok) but it does not appear in the add printer system prefs page. I don't have the USB connection available. Please help because it's driving crazy me.

  • Profiles of blackBerry Smartphones

    I have a Pearl (8110). My question is when I go into the profiles of change from normal to vibrate, I then go ahead and deselect all custom profiles and exceptions that I created, I have to do an or y at - it an easy way to do this?  for example, whe