Disable ORA errors in sql script

All,

I am running a sql statement select script bash as the below one,
string="user/pass@tns"
tot=`sqlplus -s $string << EOF
set echo off
set feedback off
set head off
select count(*) from test_table;
EOF
`
This affects the total of test_table for tot shell variable. Now I get the erro ORA below during the execution of this
script
ERROR: ORA-28002: the password will expire within x days
Now the tot variable is assigned with count of test_table + ERROR: ORA-28002: the password will expire in x days.
I need a way to get only the total number of rows without any string, set help command here? or should go for another way

Barros says:
Ok. I can reset the password, but however I want my real output (total number) in the variable and do not have these errors to be there in the variable. It is ultimately a failure my entire script.

So, there are 2 possible solutions come to mind...

1 change the account so that it doesn't have a time of expiration on this...

http://docs.Oracle.com/CD/E11882_01/server.112/e10897/users_secure.htm#ADMQS12044

or if this isn't the case because security in your company requires it expires periodically...

2. do not your processes in a script, but rather make it all through a procedure in the database and use, a work of database programming if necessary etc. and then you don't have to worry about these messages of "login".

Tags: Database

Similar Questions

  • ORA-06550: In SQL Script

    When I try to reach below as a script, I get the following error. Very simple syntax error, I could not find the problem

    ORA-06550: line 296, column 6:
    PLS-00103: encountered the symbol "SP_ST_EXCEL_IMPORT" during the expected in the following way:

    := . ( @ % ;
    The symbol ': = ' was replaced by 'SP_ST_EXCEL_IMPORT' continue.
    ORA-06550: line 297, column 6:
    PLS-00103: encountered the symbol "SP_ST_EXCEL_IMPORT" during the expected in the following way:

    := . ( @ % ;
    The symbol ': = ' was replaced by 'SP_ST_EXCEL_IMPORT' continue.

    set define off
    declare
    procedure sp_st_excel_import)
    iprofileid in varchar2,
    icurrent_title in varchar2,
    iupdated_title in varchar2,
    icurrent_supervisor_princ varchar2,
    iupdated_supervisor_princ varchar2
    )
    as
    vagent_id_c table1.agent_id_c%type;
    vbackup varchar2 (32767).
    Start
    Start
    Select agent_id_c
    in vagent_id_c
    FROM table1
    where acct_id_c = 000000000
    and agent_internal_id_c = iprofileid;
    exception
    while others then
    sp_i_adderror ('sp_st_excel_import', 0, "" Agent Id not found' ",);
    return;
    end;

    vbackup: = "" ' | " vagent_id_c | '",';


    If (icurrent_title is not null and iupdated_title is not null) then
    Select vbackup | '"' || titile_c | "', 'update',"
    in vbackup
    FROM table1
    where agent_id_c = vagent_id_c;
    Update table1
    Set titile_c = iupdated_title
    where agent_id_c = vagent_id_c;
    on the other
    Select vbackup | "" "" ","not updated","
    in vbackup
    FROM table1
    where agent_id_c = vagent_id_c;
    end if;

    If (iupdated_supervisor_princ is not null) then
    Select vbackup | '"' || agent_cust_1 | "', 'update',"
    in vbackup
    FROM table1
    where agent_id_c = vagent_id_c;
    Update table1
    Set agent_cust_1 = iupdated_supervisor_princ
    where agent_id_c = vagent_id_c;
    on the other
    Select vbackup | "" "" ","not updated","
    in vbackup
    FROM table1
    where agent_id_c = vagent_id_c;
    end if;

    sp_i_adderror('sp_st_excel_import',0,vbackup);
    end;

    Start
    sp_st_excel_import exec ('111', ", 'Manager',", 'test');
    sp_st_excel_import exec ('222', ",", ",");
    sp_st_excel_import exec ('333', ", 'Eat',", 'test');
    end;
    /

    Hello

    840992 wrote:

    When I try to reach below as a script, I get the following error. Very simple syntax error, I could not find the problem

    ORA-06550: line 296, column 6:
    PLS-00103: encountered the symbol "SP_ST_EXCEL_IMPORT" during the expected in the following way:

    := . ( @ % ;
    ...

    Start
    sp_st_excel_import exec ('111', ", 'Manager',", 'test');
    sp_st_excel_import exec ('222', ",", ",");
    sp_st_excel_import exec ('333', ", 'Eat',", 'test');
    end;
    /

    In Pl/SQL, you can call a procedure named SP_ST_EXCEL_IMPORT like this:

    sp_st_excel_import ('111', NULL, 'Manager', NULL, 'test');

    Note that there are no keyword EXEC.

    EXEC is a SQL * Plus command, which you can not run in PL/SQL (and you don't need to).

  • SQL script error

    Hi all

    I create a sql script. I am getting an error on an IF clause and I can not find the reason for this is the script:

    command prompt
    prompt QUIN CANVI FLIGHT REALITZAR TIPUS?
    prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    command prompt
    prompt CANVIAR has RO (PULSA 1)
    prompt CANVIAR has RW (PULSA 2)
    command prompt
    Guest Introdueix el canvi tipus a realitzar: & & tipus
    variable number of tipus_canvi;
    variable tipus_antic char (10);
    Start
    tipus_canvi: = & tipus.
    If type = 1 then tipus_antic: = "ONLINE";
    ElseIf type = 2 then tipus_antic: = 'READ ONLY ';
    of another raise_application_error (-20200, 'Not valor of United Nations are valid per aquesta operacio Aquest.');
    end if;
    end;
    /

    And this is the error:

    ElseIf (type = 2) then tipus_antic: = 'READ ONLY ';
    *
    ERROR on line 4:
    ORA-06550: line 4, column 25:
    PLS-00103: encountered the symbol "THEN" when expecting one of the following conditions:
    := . ( % ;
    ORA-06550: line 5, column 6:
    PLS-00103: encountered the symbol "ELSE" when expecting one of the following conditions:
    (begin case declare end exit for goto if loop mod null
    pragma raise return select update when all with
    < an ID > < a double quote delimited id
    ORA-06550: line 7, column 1:
    PLS-00103: encountered the symbol "END".

    Please, can you help me?
    Concerning
    dbajug

    Hello

    Your if syntax is incorrect.

    Please find below syntax

    IF condition THEN
             {...statements...}
    ELSIF condition THEN
             {...statements...}
    ELSE
             {...statements...}
    END IF;
    

    It's ELSIF not ELSEIF.
    Twinkle

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

    I'm trying to do something like that. The application works well and returns a few rows when run independently. But the script gives error:
    ORA-06502: PL/SQL: digital error or value
    ORA-06512: at line 108

    DECLARE
    QCURSOR SYS_REFCURSOR;
    QUERYCONTEXT DBMS_XMLGEN. CTXHANDLE;
    RESULT CLOB.
    RXML XMLType.
    BEGIN
    OPEN QCURSOR TO SELECT
    SOMECOLUMN1 "Label1"
    .
    .
    .
    .

    FROM SOMETABLE;


    queryContext: = DBMS_XMLGEN.newContext (qcursor);

    DBMS_XMLGEN.setRowSetTag (queryContext, 'Message');
    DBMS_XMLGEN.setRowTag (queryContext, 'Record');
    DBMS_XMLGEN.setNullHandling (queryContext DBMS_XMLGEN. EMPTY_TAG);

    -To get the result
    result: = DBMS_XMLGEN.getXML (queryContext);

    -Narrow context
    DBMS_XMLGEN.closeContext (queryContext);

    NARROW Qcursor;

    Train IS NULL THEN
    DBMS_OUTPUT. PUT_LINE ('(NULL)');
    ON THE OTHER
    DBMS_OUTPUT. Put_line (result); -Line 108
    END IF;
    END;

    Could not understand what the problem is? Any ideas?

    Omer

    The result is CLOB, I remember that they must be treated differently (not via dbms_output.put_line).

    Something like:

    dbms_output.put_line (DBMS_LOB. GetLength (l_xmlclob));
    -display the content of CLOB
    LOOP
    l_loc: = dbms_lob.instr (l_xmlclob, Chr (10), l_anc);
    l_text: = dbms_lob.substr (l_xmlclob, l_loc - l_anc, l_anc);
    l_anc: = l_loc + 1;
    dbms_output.put_line (l_text);
    WHEN OUTPUT l_loc = 0;
    END LOOP;

  • to DECLARE * ERROR at line 1: ORA-00900: invalid SQL statement

    This works fine when I use the System user to create a schema and then run this script.
    When I create another user with grant connect, resources, create view permissions I get this error:

    DECLARE
    *

    ERROR on line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at...


    DECLARE
    ID MY_TABLE.ID%TYPE;
    tNom my_table. % TABLENAME TYPE;
    PName MY_TABLE_TWO. PROPERTYNAME % TYPE;
    CURSOR c1 IS
    SELECT distinct evt.id, evt. TABLENAME, vid.propertyname
    FROM my_table evt, vid MY_TABLE_TWO
    WHERE the evt. COL_1 = 1
    AND evt. COL_2 = vid. COL_2
    and not exists (select facts FROM MY_TABLE_THREE 1)
    where evt.id = facts.eventid and facts.displayname = vid.propertyname);
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 INTO id, tNom, pname;
    OUTPUT WHEN c1% NOTFOUND;
    INSERT INTO MY_TABLE_THREE (ID, COLUMNLENGTH)
    VALUES (S_ANALYTICS_SEQUENCE.nextval, 255);
    RUN IMMEDIATELY 'ALTER TABLE ' | tNom | 'Add ' | PName | ' _ NVARCHAR2 (255);
    END LOOP;
    CLOSE c1;
    END;

    Hello

    Maybe missing a privilege. If I were you, I'll try this first:

    DECLARE
       id    MY_TABLE.ID%TYPE;
       tname MY_TABLE.TABLENAME%TYPE;
       pname MY_TABLE_TWO.PROPERTYNAME%TYPE;
       CURSOR c1 IS
          SELECT DISTINCT evt.id,
                          evt.TABLENAME,
                          vid.propertyname
            FROM MY_TABLE     evt,
                 MY_TABLE_TWO vid
           WHERE evt.COL_1 = 1
             AND evt.COL_2 = vid.COL_2
             AND NOT EXISTS (SELECT 1
                    FROM MY_TABLE_THREE facts
                   WHERE evt.id = facts.eventid
                     AND facts.displayname = vid.propertyname);
    BEGIN
       OPEN c1;
       LOOP
          FETCH c1
             INTO id, tname, pname;
          EXIT WHEN c1%NOTFOUND;
          INSERT INTO MY_TABLE_THREE
             (ID,
              COLUMNLENGTH)
          VALUES
             (S_ANALYTICS_SEQUENCE.NEXTVAL,
              255);
          DBMS_OUTPUT.put_line('ALTER TABLE ' || tname || ' add ' || pname ||
                               '_ NVARCHAR2(255)');
          --EXECUTE IMMEDIATE 'ALTER TABLE ' || tname || ' add ' || pname || '_ NVARCHAR2(255)';
       END LOOP;
       CLOSE c1;
    EXCEPTION
       WHEN OTHERS THEN
          DBMS_OUTPUT.put_line(SQLERRM);
    END;
    /
    

    Using this approach, you can see the sentences to run without run, I also added an exception block.

    Kind regards

  • 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

  • ORA-06528: PL/SQL Profiler generator runtime error

    Version 11.2.0.3.  I have installad DBMS_PROFILER:

    SYS AS SYSDBA > @?/rdbms/admin/profload.sql

    SYS AS SYSDBA > @?/rdbms/admin/proftab.sql


    I tried to use dbms_profiler.start_profiler in PLSQL code with user NUFN and discovered that lacked the NUFN user privileges on the objects of the Profiler. So I ran the following grants:

    grant the update, insert and delete on plsql_profiler_units to NUFN;

    grant the update, insert and delete on plsql_profiler_runs to NUFN;

    Grant execute on DBMS_PROFILER to NUFN;

    But still no luck:

    SQL > START

    dbms_profiler.start_profiler ('test1');

    EXECUTE IMMEDIATE 'select max (STATS_UPDATE_TIME), owner of the DBA_TAB_STATS_HISTORY group from owner to owner.

    dbms_profiler.stop_profiler ();

    END;

    /

    BEGIN

    *

    ERROR on line 1:

    ORA-06528: PL/SQL Profiler generator runtime error

    ORA-06512: at "SYS." DBMS_PROFILER", line 123

    ORA-06512: at "SYS." DBMS_PROFILER", line 132

    ORA-06512: at line 2

    I can't find what is missing from my user NUFN for her to be able to run DBMS_PROFILER.  Help, please!

    Thanks Bella, I had not run @?/rdbms/admin/proftab.sql as my user NUFN but as sys.  But you know what?  Even after execution of @?/rdbms/admin/proftab.sql as NUFN, the problem persisted!

    So I traced my session, read the trace file and found nothing wrong (but I have no experience in finding fault with the workings of dbms_profiler).  But I found the SQL code executed by the dbms_profiler.start_profiler command, which is:

    PARSING IN CURSOR #4574691968 len = 155 dep = 2 uid = 155 oct 2 lid = 155 = tim = hv 530047132716 = ad 3718124591 = "7000000946da848" sqlid = "akx2pxvftw51g."

    INSERT INTO PLSQL_PROFILER_RUNS (RUNID, RUN_DATE, RELATED_RUN, RUN_OWNER) VALUES (PLSQL_PROFILER_RUNNUMBER. NEXTVAL,: B1,: B2, USER) RETURN RUNID IN: O0

    END OF STMT

    ANALYSIS #4574691968:c = 315, e = 844, p = 0, cr = 0, cu = 0, put = 1, r = 0, dep = 2, og = 1, plh = 0, tim = 530047132715

    I tried manually the same HOME, and bingo, I discovered the cause of my problem:

    INSERT INTO PLSQL_PROFILER_RUNS (RUNID, RUN_DATE, RELATED_RUN, RUN_OWNER) VALUES (PLSQL_PROFILER_RUNNUMBER. NEXTVAL, sysdate, 'manually', 'ME');

    ORA-01950: no privileges on tablespace execution times

    After performing ALTER USER NUFN QUOTA UNLIMITED ON STATES; the problem has been resolved.

    Conclusion: after DBMS_PROFILER installation for a user, make sure that the user can write in objects DBMS_PROFILER (SUBSIDIES and QUOTAS).

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

  • Getting Ora-06502: PL/SQL of Numeric or value error.

    Hello

    I m getting the following error when a calculation for form fields.

    ""Server Ajax Call returned error Ora-06502: PL/SQL digital error or value ".

    I m using the dynamic action to calculate my value fields display. Here is the code of my DA.

    (Required value) event: change

    Selection type (required): product (s)

    Article (s) (required): P141_PROP_COST, P141_DOWNPAY_AMT, P141_PREM_PERC, P141_DOWNPAY_PERC, P141_PREM_AMT



    Begin

    : P141_TOTAL_SELL_PRICE: =: P141_DOWNPAY_AMT +: P141_PREM_AMT;

    : P141_COMM_AMT: =: P141_TOTAL_SELL_PRICE*.02;

    : P141_TOTAL_SELL_PRICE_FEE: =: P141_TOTAL_SELL_PRICE +: P141_TRANSFER_COST +: P141_COMM_AMt;

    : P141_INST_REM_AMT: =: P141_PROP_COST-: P141_DOWNPAY_AMT;

    End;

    Page point to presented: P141_PROP_COST, P141_DOWNPAY_AMT, P141_PREM_AMT, P141_TRANSFER_COST

    Return point page: P141_TOTAL_SELL_PRICE, P141_COMM_AMT, P141_TOTAL_SELL_PRICE_FEE, P141_INST_REM_AMT

    I m using another DA for the calculation and validation of my form fields rest. Here is the code:

    {$("#P141_DOWNPAY_PERC").change (function ()}

    var x = ($("#P141_DOWNPAY_PERC").val () / 100) * $("#P141_PROP_COST").val ();

    $("#P141_DOWNPAY_AMT").val (x);

    });

    {$("#P141_DOWNPAY_AMT").change (function ()}

    If ($("#P141_DOWNPAY_AMT").val () > $("#P141_PROP_COST").val ())

    {

    Alert ("section may be no greater than the basic price");

    }

    on the other

    {var y = ($("#P141_DOWNPAY_AMT").val () / ($("#P141_PROP_COST").val ())) * 100;}

    y = Math.Round (y);

    $("#P141_DOWNPAY_PERC").val (y) ;}

    });

    {$("#P141_PREM_PERC").change (function ()}

    var x = ($("#P141_PREM_PERC").val () / 100) * $("#P141_PROP_COST").val ();

    $("#P141_PREM_AMT").val (x);

    });

    {$("#P141_PREM_AMT").change (function ()}

    If ($("#P141_PREM_AMT").val () > $("#P141_PROP_COST").val ())

    {

    Alert ("section may be no greater than the basic price");

    }

    on the other

    {var z = ($("#P141_PREM_AMT").val () / ($("#P141_PROP_COST").val ())) * 100;}

    z = Math.Round (z);

    $("#P141_PREM_PERC").val (z) ;}

    });

    Any help.

    Concerning

    Pa

    'Problems of implicit conversion' comes to mind when I see this:

    : P141_TOTAL_SELL_PRICE: =: P141_DOWNPAY_AMT +: P141_PREM_AMT;

    This is similar to the problems I've seen when using the default formats for the Date Picker Item Types.

    I will add in some APEX_DEBUG. MESSAGE() lines to check what are the string values.

    (remember, all bind variables are of type VARCHAR2)

    You should maybe explicitly to convert strings to numbers using TO_NUMBER() and include the appropriate format.

    (a bit like you have to do with the conversion of strings to dates.)

    My $0.02 worth

    MK

  • 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

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

Maybe you are looking for

  • Paper art are grayed out

    Hello world Any setting I try, I can't select Pages fine art papers. I select manual back, before art, black etc Matt, there is always grey I have re set the printer pane, upgraded to El Capitan, purchased and installed an Epson P800 The same problem

  • Workstation 8560w: Hello (hp) Can I put the graphics card

    Hello (hp) can I upgrade graphics card AMD over-pants M6000 GDDR5 2 GB graphics card ATI video for Dell Precision M6600 M6800 Workstation M6700 laptop drive case for computer laptop 8560w Workstation without any hardware or software problem IM amir f

  • put on without password?

    Hello! How do I set up windows so it does not close when the key was hit in a certain period of time? And then how do I set up my laptop so I don't have to enter a password every time I turn it on? Thank you John Bolger

  • HP Officejet Pro 6830: HP6830 multi stream scanning

    This printer there the possibility to scan by using the multi charger rather than putting each page on the flat? If he lacks this installation, use of it?

  • BlackBerry Smartphones caller ID not working not

    I bought one unlocked Telus Storm 2 9550.Currently using this phone on the Rogers network.Phone works fine, but the caller ID does not work completely. If someone calls me on Earth the caller id works fine line and name appears as in my contacts list