Numeric or Value Error (Very Urgent)

Greetings,
I have a PL/SQl block where I hava a select into statement. The database column is a char(1) and the PL/SQL variable is a varchar2(2).
Will this throw the Numeric or Value Error ??? ..
Please post Ur suggesions
Thanx
Badhri ...

You can do a simple test yourself to confirm that it does not cause an error:
SQL> CREATE TABLE your_table
  2    (test_column CHAR (1))
  3  /
Table created.
SQL> INSERT INTO your_table (test_column)
  2  VALUES ('A')
  3  /
1 row created.
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2    v_test VARCHAR2 (2);
  3  BEGIN
  4    SELECT test_column
  5    INTO   v_test
  6    FROM   your_table;
  7    DBMS_OUTPUT.PUT_LINE (v_test);
  8  END;
  9  /
A                                                          
PL/SQL procedure successfully completed.

Similar Messages

  • Ora-06502 numeric or value error --urgent

    Hai ALL,
    In our Application some fields are blank and gives an error 'ora-06502 numeric or value error'. The blanked Fields are taken from another server. Before the error some os booting problem arises and reboot the server. no oracle maintanace and software maintanace done this place. the network connectivity is ok. How the oracle error comes? how to rectify ..please help.. Oracle version is 7..and an urgent matter.
    Shiju

    Hi Orashiju,
    ORA-06502:     PL/SQL: numeric or value error string
    Cause:     An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
    Action:     Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
    For more use this link. I am certain you will get an solution.
    http://ora-06502.ora-code.com/
    Thanks
    Shivank

  • Urgent - ORA-06502 numeric or value error in Complex SQL Join

    I am having trouble with a tricky bit of code.
    I have a complex join query which uses reference cursors.
    type search_cursor is ref cursor;
    c_result search_cursor;
    cursor c_result1 is
    select chemicals.*,buildings.building_name,msds.msds,chemical_ras.ra from chemicals,msds,chemical_ras,buildings;
    cv_result c_result1%rowtype;
    pv_query := 'select chemicals.*,buildings.building_name,msds.msds,chemical_ras.ra from
    chem_location_join
    right join room_permissions on chem_location_join.room_id = room_permissions.room_id
    inner join chemicals on chemicals.chemical_id = chem_location_join.chem_id
    inner join cupboards on cupboards.cupboard_id=chem_location_join.cupboard_id
    inner join rooms on rooms.room_id=chem_location_join.room_id
    inner join buildings on buildings.building_id=chem_location_join.building_id
    inner join csr on chemicals.chemical_id=csr.chemical_id
    left join msds on msds.csr_id = csr.csr_id
    left join chemical_ras on csr.csr_id= chemical_ras.csr_id
    where research_group_id = '||pv_research_group_id||' and upper(' || p_search_field || ') LIKE upper(''%' || p_search_entry || '%'') order by chemicals.chemical_name';
    Basically,
    When the italics are left out, the query runs perfectly. However, when it is put in, it returns the ORA-06502 numeric or value error.
    I have run the query in SQL using values in the where clause and it works perfectly. When i replace buildings with other similar elements, i.e. cupboard, room the query returns a similar error.
    Sorry if this seems hard to understand, if you need more clarification please reply.
    Many Thanks,
    Simon
    Message was edited by:
    SimonHollingsworth

    no but that shouldn't matter because all that cursor is doing is setting the variable cv_result equal to the same %rowtype, the where clause shouldn't be relevant. in any case I don't have a where clause when the italic bit is left out and it still works fine

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

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

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

  • -6502 ORA-06502: PL/SQL: numeric or value error when using 'Create CAPI Definition'

    I get an error when I try to create a CAPI definition with Headstart untilities (6i). I use HSU_CAPI revision 6.5.2.0
    The detailed information says the following:
    Message
    BLAPI.OPEN_ACTIVITY
    Start HSU_CAPI.run
    Number of Tables to create CAPI for 1
    Initial checks for table KCS_TENDERS with id 692754610572409851363604771392473242
    HSU_CAPT.initial_checks for table KCS_TENDERS
    HSU_CAPF.initial_checks for table KCS_TENDERS
    HSU_CAPC.initial_checks Custom Services for table KCS_TENDERS
    HSU_CAPB.initial_checks BRDD for table KCS_TENDERS
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDIPLS
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    KCS_TENDERS Business Rule Design Definition BR_TNR001_CEV does not have any Trigger Columns. Rule will fire when any column is updated.
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDIPLS
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    Creating CAPI for table KCS_TENDERS with id 692754610572409851363604771392473242
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Insert-stmt, Open transaction.
    Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Update-stmt, Open transaction.
    Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-stmt, Open transaction.
    Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Insert-stmt, Close transaction.
    Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Update-stmt, Close transaction.
    Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Delete-stmt, Close transaction.
    Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-row, Save old data.
    Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCODE number of text lines = 404 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Insert, Call CAPI.
    Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCODE number of text lines = 4 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Update, Call CAPI.
    Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCODE number of text lines = 4 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Delete, Call CAPI.
    Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCODE number of text lines = 17 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Insert, Call CAPI.
    Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCODE number of text lines = 7 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Update, Call CAPI.
    Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCODE number of text lines = 144 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Delete, Call CAPI.
    Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCODE number of text lines = 282 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    HSU_CAPF.create_or_find_capi_pack
    hsu_capi.find_plm (kcs_tnr_capi, 692754610572409851363604771392473242, CAPI).
    capi package found in the context folder
    BLPLM.UPD
    FREE_FORMAT_TEXT_FLAG......... = Y
    IMPLEMENTATION_NAME........... = kcs_tnr_capi
    PLSQL_MODULE_TYPE............. = PACKAGE
    SCOPE......................... = PUBLIC
    COMPLETION_STATUS............. = COMPLETED
    NAME.......................... = kcs_tnr_capi
    PURPOSE....................... = Custom API package for implementing Business Rules and supporting TAPI
    Recreated Package KCS/ KCS_TNR_CAPI, preserving only the Revision History.
    HSU_CAPF.add_tags_er_av
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    HSU_CAPF.create_specification
    HSU_CAPF.create_c_tabalias
    HSU_CAPF.create_c_tabalias_all
    HSU_CAPF.create_aggregate_value
    HSU_CAPF.create_aggregate_value
    HSU_CAPF.create_aggregate_value
    Activity aborted with ORACLE internal errors.
    -6502 ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    What can I do about it???
    Thanks in advance.
    Menno Hoogsteen

    Working on the same project as Menno, I had the time to look into the problem.
    The problem is caused by the creation of the capi-function agregate_char_value in the packages hsu_capf. While creating this function the following code is executed:
    add(' -- allowable values:');
    add(' -- '||l_col_name_list);
    This last statement causes the problem because this table is very big. L_col_name_list contains 2391 characters wich is 393 characters to long. So i changed this code into:
    add(' -- allowable values:');
    add(' -- '||substr(l_col_name_list,1,1990));
    add(' -- '||substr(l_col_name_list,1990));
    and everything works fine. Perhaps something for a patch?
    Kind regards,
    Ruben Spekle

  • Pl/Sql numeric or value error

    Hi All,
    Does any one know if there is a bug in Oracle 8 related to date variable?
    This is the second time I am seeing very peculiar problem with date package variable as well as local variable.
    1) Few weeks back, I encountered problem with Date package variable, which is giving pl/sql numeric or value error,if you leave the session idle for few hours. When you connect back, the query runs just fine without any problem. To fix this I had to remove the date package variable.
    2)And now I am seeing that my job which calls the above package failing after running for long hours. It fails due to a local date variable with Pl/sql numeric or value error. Now, I am going to remove this variable also.
    Anyone has thoughts on this?
    Thanx for any inputs.

    Hi,
    I have solved by adding the following statement.
    DBMS_LOB.CREATETEMPORARY(theClob,cache=>false);
    Thanks,
    Rammu

  • Numeric or value error: character string buffer too small

    Hi,
    I have no problem with this code :
    select htmldb_item.text(3,nom,20) nom,
    htmldb_item.select_list_from_query(9,v_urba_rue.ref_fantoir,'select distinct(nom_voie),v_urba_rue.ref_fantoir from adresse,v_urba_rue where adresse.ref_fantoir(+)=v_urba_rue.ref_fantoir and ref_commune=20 and v_urba_rue.ref_fantoir between 1280 and 1370') rue
    from personne,participe,adresse,v_urba_rue
    where ...
    but when i modify :
    ...and v_urba_rue.ref_fantoir between 1280 and 1400') rue...
    i have this error :
    ORA-06502 PL/SQL: numeric or value error: character string buffer too small
    any solution?
    thank you very much

    Is this the same posting as
    ORA-06502 numeric or value error string

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

    HI All,
    I am facing the following issue and looking forward for help to find the cause.
    We are converting PDF documents in our repository to HTML using Oracle API
    ctx_doc.ifilter (v_datablob, v_dataclob);
    a highly simplified version of our code will be something like this..
    1) Create table to store the BLOB(Binary PDF documents)
    create table tbl_pdf_store(pdf_doc blob);
    2) Insert a row and store a PDF.
    3) Convert the PDF into HTML and store it in a CLOB object..
    DECLARE
    v_datablob BLOB;
    v_dataclob CLOB;
    BEGIN
    --Create temporary clob objects
    DBMS_LOB.createtemporary (v_dataclob, TRUE, DBMS_LOB.SESSION);
    DBMS_LOB.createtemporary (v_datablob, TRUE, DBMS_LOB.SESSION);
    --get the pdf to be converted from store table
    SELECT pdf_doc
    INTO v_datablob
    FROM tbl_pdf_store
    WHERE rownum < 1;
         --convert the BLOB to HTML and store it in CLOB
         ctx_doc.ifilter (v_datablob, v_dataclob);
    exception
         when others then
         dbms_output.put_line(sqlerrm||' - '||sqlcode);
    end;
    Now the issue I am facing is, the above code works fine for few documents and for few others I get this cryptic error message
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "CTXSYS.DRUE", line 180
    ORA-06512: at "CTXSYS.CTX_DOC", line 1142
    ORA-06502: PL/SQL: numeric or value error - -6502
    I cant reproduce the exact code here, but if anyone had faced the similar issue, then it would be great if they help me out.
    thanks,
    Prashant

    > Billy, its not just plain wrong its a sin :). "When
    others" should itself be avoided if possible(it just
    shows you don't know what error can occur). In the
    actual code, we are using separate package to handle
    and log errors. Here it was just for simplification I
    added that putline code.
    Phew.. You had me worried there... :-)
    > I ran my procedure in debug mode and it throws this
    exception when its executing the Oracle API
    ctx_doc.ifilter
    And there is very little you can do debugging that, as that source code is encoded (wrapped).
    Which means that unfortunately you have to treat that code as a black box and investigate the bug with respects to:
    a) the "environment" from which the call is made (ito of session settings, the sequence of calls made, etc)
    b) the data and parameters passed
    > this is not the case with all the PDFs..I was able to
    convert more than 11 thousand documents without any
    issues. I have this for only few hundred documents.
    This would seem to point to a bug in Oracle's CTX conversion/filter code. Maybe those PDFs are a newer version and is not correctly supported. Maybe they're an older version that is not supported.
    Which is why I said you need to isolate the error. Determine which PDFs are failing. Create a test harness (simplified code as you've posted) to perform a conversion (and nothing else).
    Determine which PDFs fail and which works. Look at the differences between PDFs. E.g. can those problem PDFs be opened with different Acrobat Reader version - or do some of them fail?
    > Another issue is I cannot view the content of the
    these documents to check if anything is different :(.
    You can with Acrobat Reader.. right?
    > so no sure how to go from here...is there a
    printstack method in Oracle 9i(similar to 10g I
    guess) which can give me more information as I am
    currently lost and not sure where to look.
    Dumping the stack will not be of much help. In fact, the error message sequence you pasted already show the call sequence. And as these are in Oracle PL/SQL code, there is nothing really you can do about it.
    My suggestion is to
    a) isolate the error
    b) consult the manual(s) to ensure that the Oracle PL/SQL s/w is used correctly
    c) determine if this is data related (e.g. different PDF versions for example)
    d) log a SR (Service Request) with Oracle Support
    The more you can do ito of (a) - (c), the better the chance for finding the root cause, and the quicker resolution when you have no choice but to do (d).

  • ORA-6502: PL/SQL: numeric or value error: character string buffer too small WWV-11230

    Hi,
    I'm trying to create an UI Template. I've generated the html using Frontpage and am successfully able to see in a browser.
    I've copied the html to the UI form, but when I try to preview or execute the UI template, I get the following error:
    Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-11230)
    null

    I AM FACING SIMILAR PROBLEM, THE EXACT ERROR IS:
    Error: Excepcisn de wwv_generate_component.build_procedure (WWV-01821)
    No se ha podido generar la pantalla de interfaz de usuario: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-16409)
    (SORRY , PART OF THE ERROR IS IN SPANISH!)
    I CREATED A FORM , WORKED WITH IT A LOT WITHOUT PROBLEMS. NOW I NEED TO DO SOME CHANGES ON CERTAIN FIELDS AND WHEN I TRY TO SAVE IT I GET THE ABOVE ERROR.
    THEN I GO BACK TO AN OLDER VERSION, COPY AND TRY TO DO CHANGES AND AGAIN THE ERROR COMES UP.
    THE CHANGES I AM TRYING TO DO ARE TO SOME OF THE EXISTING FIELDS IN THE FORM WHICH NEED TO BE PUT AS "INSERTABLE".
    THE SCREEN LAYOUT IS DISPLAYED WITHOUT PROBLEM.
    (THE FORM IS BASED ON A TABLE WITH APROX 80 FIELDS).
    I NEED SOME URGENT HELP. PLS LET ME KNOW ANY OTHER INFO YOU MAY NEED TO HELP ME SOLVE THIS PROBLEM.
    FYI I AM WORKING ON PORTAL VERSION 3.0.9 / ON Windows 2000 (DATABASE 8.1.7.0 AND iAS ARE ON DIFFERENT MACHINES).
    TKS IN ADVANCE

  • Difficulty in resolving ORA-06502: PL/SQL: numeric or value error:

    Hi
    I am having great difficulty to resolve the following error - ORA-06502: PL/SQL: numeric or value error: character string buffer too small . In my Oracle Package, I have a Function that returns a varchar(255).
    My Function is basically as follows:
    FUNCTION GetUserDept (DeptNum IN NUMBER) RETURN VARCHAR2
    IS
    deptname varchar(255);
    BEGIN
    SELECT name INTO deptname
    FROM depts
    where id = DeptNum;
    RETURN deptname
    END;
    The SQL is running correctly and returns one result, which is what I want. However, when I call the function in my .NET C# code, this is when I am seeing the error message.
    In my code, I said that the commandtype is a stored procedure, passed the parameters, and add it to to the parameters, with the return type and direction put first and executed as a scalar. The code executes, and then fails at the ExecuteScalar line, and it is at this point on my exception handler that I see the error message ORA-6502.
    This really odd, because I have two other functions that return numbers, and I have executed them in the same way, and theses works!
    I have checked my function and can't see what is wrong, and I have tried changing the return type from varchar2 to NVarchar on the return type, but this made no difference.
    This problem has really dogged me for hours and I cannot see how to resolve it.
    Can someone, please help me?

    user633278 wrote:
    This really odd, because I have two other functions that return numbers, and I have executed them in the same way, and theses works!It is that very reason that your code fails. You need to declare the return variable as a string.
    SQL?create or replace
    FUNCTION GetUserDept (DeptNum IN NUMBER) RETURN VARCHAR2
    IS
    deptname varchar(255);
    BEGIN
      RETURN 'hello world';
    END;
      2    3    4    5    6    7    8    9   10 
    Function created.
    SQL?
    SQL?
    declare
      x number;
    begin
      x := GetUserDept(100);
    end;
    SQL?  2    3    4    5    6  declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 4
    SQL?
    SQL?
    declare
      x varchar2(255);
    begin
      x := GetUserDept(100);
    end;
    SQL?  2    3    4    5    6 
    PL/SQL procedure successfully completed.

  • ORA-06502: PL/SQL: numeric or value error: in Inserting record in form 2.0

    Hi All,
    Can somebody help me out here urgently. I just added a New Column to a Table & when I try to use that Column in a Form & Insert using Automatic Row Processing(DML). I am getting this error, If I remove the newly created column, then it is fine.
    Please help. I saw some posting on forum, but there was no solution.
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
         Error      Unable to process row of table <tablename>
    OK      
    Thanks
    Sandeep

    Sandeep - Looks like you're hitting a 4096-character limit for the values portion of the insert statement because you have so many columns. This is a bug. A workaround would be to reduce the number of columns or create your own DML process for the insert operation.
    Also just now I installed htmldb 2.0 in my laptop & trying to create the same table, but it is not creating ...no errors ..just a clue...I don't understand what you said.
    Scott

  • PL/SQL: numeric or value error: Bulk bind: Error in define

    Hello
    Does anyone know what this error means?
    PL/SQL: numeric or value error: Bulk bind: Error in define
    I've checked the cursor and all of the columns are correct.
    Any help would be greatly appreciated as this is quite urgent.
    Cheers
    David

    Hello
    Here's the top of the function. The exception is thrown on the FETCH...BULK COLLECT line.
    FUNCTION f_ps_insert_jlines(ac_JournalRows     IN sys_refcursor,
                                            an_StartLn          IN OUT INTEGER,
                                            at_Monetary          IN OUT pt_monetary_amount,
                                            at_Stats          IN OUT pt_statistics_amount
                                            ) RETURN INTEGER
         IS
              l_jrnl_id                         pt_jrnl_id;
              l_jrnl_line                         pt_jrnl_line;
              l_jrnl_date                         pt_jrnl_date;
              l_Ps_Account                    pt_ps_account;
              l_ps_dept_id                    pt_ps_dept_id;
              l_ps_product                    pt_ps_product;
              l_ps_project_id                    pt_ps_project_id;
              l_statistics_code               pt_statistics_code;
              l_jrnl_ln_ref                    pt_jrnl_ln_ref;
              l_line_desc                         pt_line_desc;
              ln_Index                         INTEGER;
         BEGIN
              FETCH ac_JournalRows BULK COLLECT INTO
                                                           l_jrnl_id,
                                                           l_jrnl_line,
                                                           l_jrnl_date,
                                                           l_Ps_Account,
                                                           l_ps_dept_id,
                                                           l_ps_product,
                                                           l_ps_project_id,
                                                           l_statistics_code,
                                                           at_monetary,
                                                           at_stats,
                                                           l_jrnl_ln_ref,
                                                           l_line_desc;And here is the top of the cursor....
    SELECT
                                                      l_char_jrnl_id                         AS journal_id,
                                                     ROWNUM + l_jrnl_Line               AS journal_ln,
                                                      lcr_Journal_Header.Journal_Dt      AS journal_dt,
                                                      ps_account,
                                                      ps_dept_id,
                                                      ps_product,
                                                      ps_project_id,
                                                      statistics_code,
                                                      monetary_amount,
                                                      statistics_amount,
                                                      jrnl_ln_ref,
                                                      line_desc
                                                FROMAny ideas?
    Cheers
    David
    p.s. No idea what has happened to the formatting!

  • Error Message - ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Trunc

    This is driving me nuts!
    I am getting this error from OWB during a mapping process.
    I have checked the input data and it looks fine.
    The run time audit browser just lists all of the steps but does not make it clear which one failed. Is it the last one which is shown (does not have HIDE as selection link.)
    I also tried to determine which row was causing the problem and followed the instructions at http://www.nicholasgoodman.com/bt/blog/2005/07/, but no row_id was recorded in the views. In actual fact there wasn't very much audit info other than that the mapping ran and was complete (even though it failed).
    In the error message section it has, in order
    Map Step - blank
    Rowkey - 35204435256
    Severity - X
    Error Message - ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind
    Object Name - N/A
    Object Column - *
    From the PL/SQL error I thought it may be trying to insert into a data field that was too small, but all of the columns that are used are full of data of length shorter than all of the target tables.
    I have even started running the cursors in the generated PLSQL but I don't get the error by doing this.
    Thanks in advance for any tips at all.

    Thanks for the response.
    I managed to work it out and it had to do with the selection criteria of one of the filters.
    For anyone else facing this error, check to see if any of the rows being inserted has the same key/identifier as some existing in the target table. If so add an extra condition to the where clause.
    This worked for me.

  • Error at Script Editor - ORA-06502: PL/SQL: numeric or value error

    Hello everyone,
    This is my last call for help. I have made some research before i decided to create this thread, trying to find similar problems on the web and on this forum but it seems that this kind of error is associated with another type of situations. In addition, i am pretty new to Oracle DBMS and i do not know how to figure out some problems that happens in this DBMS. This one is very ridiculous because it happens when i load or create a script in Oracle Script Editor. This might be a bug for Oracle Developers figure out and correct for the next releases or updates (or not..).
    Working on:
    Oracle Database 10g Express Edition (Fresh installation - Yesterday)
    Application Express 2.1.0.00.39 (Might be useful information) Windows XP
    Problem:
    I have a script which allows to create a new database with some tables, relations and data filled in. I go to DB Homepage and login, go to Script Scripts menu and upload the script. I open the script to run it and when the Script Editor load it shows this: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    <table style="display:none;position:absolute;background-color:#EEEEEE;border:#000000 solid 1px;padding:0px;text-align:center;font-size:12px;color:#000000;" summary="" cellpadding="0" cellspacing="0" border="0" id="R138352509674476936">
    <tr>
    <td class="htmldbWizardHeader">Save Script</td>
    <td class="htmldbWizardHeader" align="right"><span><img src="/i/qb/vertical_close.png">
    </span></td>
    </tr>
    <tr>
    <td colspan="2" class="htmldbWizardBody">
    <div id="saveDialog">A script with this name already exists. Do you wish to overwrite it?</div>
    <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%">
    <tr>
    <td align="right"><input type="button" value="Cancel" class="htmldbButton">
    <input type="button" value="Yes" class="htmldbButton">
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan="2" align="right">???</td>
    </tr>
    </table>
    <table summary="">
    <tr>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11141129549203626">
    <input type="hidden" name="p_t09" value="" id="OB_OBJECT_NAME">
    </td>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11143605700225196">
    <input type="hidden" name="p_t10" value="" id="P0_PPRTIMESTAMP">
    </td>
    <td width="15">
    <div style="width:15px"><br>
    </div>
    </td>
    <td id="htmldbRegion3" class="htmldbTDRight" width="100%" valign="top"></td>
    </tr>
    </table>
    <div id="htmldbRegion4"></div>
    <div class="htmldbFlowV">Application Express 2.1.0.00.39</div>
    <div class="htmldbNewBottom">
    <div class="htmldbNewBottom1">Language: pt</div>
    <div class="htmldbNewBottom2">Copyright ? 1999, 2006, Oracle. All rights reserved.</div>
    <br style="clear:both;">
    </div>
    <form><input type="hidden" name="p_md5_checksum" value="">
    </form>
    <a name="END"><br>
    </a> <script language="JavaScript1.1" type="text/javascript">
        first_field('P60_SCRIPT_NAME');
    </script> The first line seems to be the error: boldORA-06502: PL/SQL: numeric or value error: character string buffer too small*bold*.
    However i don't understand why shows the HTML code. Seems to be the code related with the rest of the Oracle DB webpage where the script in filled in (check this two images to understand what i am trying to say: http://img146.imageshack.us/img146/3104/errororacle10g.jpg and http://img180.imageshack.us/img180/5185/scripteditornormal10g.jpg. This is what Script Editor shows on Internet Explorer.
    If i login and make the same in another browser the behavior is different. In Firefox the script editor don't show anything and with Chrome i get all the script instructions in a single line (it exceeds the Script Editor) and the Script Editor background turns red: http://img812.imageshack.us/img812/1382/oracleerrorchrome.jpg I tested some scenarios and i got other conclusions: When i try to create a script in the Script Editor, whatever i write (instructions or whatever) when i save and load the file shows the same error. I uploaded the script many times with different File Character Set and the error shows in all situations.
    Edited by: 806529 on Nov 1, 2010 3:38 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM

    The script that i am trying to run is this: (I think the script is not relevant because many class mates can upload and run it successfully on their Oracle Express 10g installed on Windows 7 or XP)
    drop table alunos cascade constraints;
    create table alunos (alu_id number(10) not null,
                   alu_nome varchar2(60) not null,
                   alu_local varchar2(30),
                   alu_dnsc date not null,
                   alu_sexo char(1) not null,
                   alu_email varchar2(30),
                   alu_cur_id number(10));
    drop table cursos cascade constraints;
    create table cursos (cur_id number(10) not null,
                   cur_nome varchar2(40) not null);
    drop table departamentos cascade constraints;
    create table departamentos (dep_id number(10) not null,
                          dep_nome varchar2(60) not null,
                          dep_sigla char(3) not null);         
    drop table disciplinas cascade constraints;
    create table disciplinas (dis_id number(10) not null,
                        dis_nome varchar2(40) not null,
                        dis_creditos number(1) not null,
                        dis_dep_id number(10));
    drop table planoestudos cascade constraints;
    create table planoestudos (pla_cur_id number(10) not null,
                          pla_dis_id number(10) not null,
                          pla_semestre number(1) not null);          
    drop table inscricoes cascade constraints;
    create table inscricoes (ins_id number(10) not null,
                    ins_alu_id number(10) not null,
                    ins_pla_cur_id number(10) not null,
                    ins_pla_dis_id number(10) not null,
                    ins_dt_inscricao date not null,
                    ins_dt_avaliacao date,
                    ins_nota number(4,2) );
    -- Chaves primárias               
    alter table alunos add constraint pk_alunos primary key (alu_id);              
    alter table cursos add constraint pk_cursos primary key (cur_id);
    alter table departamentos add constraint pk_departamentos primary key (dep_id);
    alter table disciplinas add constraint pk_disciplinas primary key (dis_id);
    alter table planoestudos add constraint pk_planosestudos primary key (pla_cur_id, pla_dis_id);
    alter table inscricoes add constraint inscricoes_pk
                primary key (ins_id);
    -- Chaves estrangeiras
    alter table alunos add constraint alunos_fk_cursos
                foreign key (alu_cur_id) references cursos(cur_id);
    alter table disciplinas add constraint disciplinas_fk_departamentos
                foreign key (dis_dep_id) references departamentos(dep_id);
    alter table planoestudos add constraint planoestudos_fk_cursos
                foreign key (pla_cur_id) references cursos(cur_id);           
    alter table planoestudos add constraint planoestudos_fk_disciplinas
                foreign key (pla_dis_id) references disciplinas(dis_id);           
    alter table inscricoes add constraint inscricoes_fk_alunos
                foreign key (ins_alu_id) references alunos(alu_id);
    alter table inscricoes add constraint inscricoes_fk_planoestudos
                foreign key (ins_pla_cur_id,ins_pla_dis_id) references planoestudos(pla_cur_id,pla_dis_id);
    -- Sequências
    drop sequence seq_alunos;
    create sequence seq_alunos increment by 1 start with 1;           
    drop sequence seq_cursos;
    create sequence seq_cursos increment by 1 start with 1;
    drop sequence seq_disciplinas;
    create sequence seq_disciplinas increment by 1 start with 1;
    drop sequence seq_departamentos;
    create sequence seq_departamentos increment by 1 start with 1;
    -- Informação
    insert into cursos values(seq_cursos.nextval,'Engenharia Biomédica');
    insert into cursos values(seq_cursos.nextval,'Engenharia Informática');
    insert into cursos values(seq_cursos.nextval,'Engenharia Electrónica e Computadores');
    insert into cursos values(seq_cursos.nextval,'Engenharia do Ambiente');
    insert into alunos values(seq_alunos.nextval,'Joaquim Pires Lopes','lisboa',to_date('85.01.01','YY.MM.DD'),'M','[email protected]',2); 
    insert into alunos values(seq_alunos.nextval,'Ana Maria Fonseca','Setúbal',to_date('87.03.03','YY.MM.DD'),'F','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Paula Antunes','Lisboa',to_date('86.07.06','YY.MM.DD'),'F',null,2); 
    insert into alunos values(seq_alunos.nextval,'Joana Ramalho Silva','Costa da Caparica',to_date('84.09.23','YY.MM.DD'),'F','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Rui Manuel Silva','Cascais',to_date('84.08.15','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'João Paulo Santos','Lisboa',to_date('81.11.16','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Cristina Fernandes Lopes','Lisboa',to_date('86.01.07','YY.MM.DD'),'F',null,1); 
    insert into alunos values(seq_alunos.nextval,'Miguel Pinto Leite','Cascais',to_date('74.01.07','YY.MM.DD'),'M','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Francisco Costa Rosa',null,to_date('78.02.16','YY.MM.DD'),'M',null,4); 
    insert into alunos values(seq_alunos.nextval,'Elsa Fialho Pinto','Palmela',to_date('79.10.29','YY.MM.DD'),'F','[email protected]',1); 
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Sistemas e Informática','DSI');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Engenharia Electrotécnica', 'DEE');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Matemática','DEM');   
    insert into disciplinas values(seq_disciplinas.nextval,'Introducao a Programacao',4,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Inteligência Artificial',3,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Redes de Computadores',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Base de Dados',6,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Complementos de Base de Dados',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise de Sistemas',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Distribuídos',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Digitais',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Microprocessadores',2 ,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Electrónica Geral',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática I',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática II',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Aplicações Multimédia',6,1);
    insert into planoestudos values(1,1,1);
    insert into planoestudos values(1,2,4);
    insert into planoestudos values(1,3,4);
    insert into planoestudos values(1,4,3);
    insert into planoestudos values(1,5,5);
    insert into planoestudos values(1,6,2);
    insert into planoestudos values(1,7,5);
    insert into planoestudos values(1,8,6);
    insert into planoestudos values(1,11,1);
    insert into planoestudos values(2,1,1);
    insert into planoestudos values(2,4,5);
    insert into planoestudos values(2,8,3);
    insert into planoestudos values(2,9,2);
    insert into planoestudos values(2,10,1);
    insert into planoestudos values(2,11,3);
    insert into planoestudos values(3,1,3);
    insert into planoestudos values(3,11,4);
    insert into planoestudos values(3,12,5);                                                             
    insert into planoestudos values(4,1,3);
    insert into planoestudos values(4,4,4);
    insert into planoestudos values(4,11,4);
    insert into planoestudos values(4,12,5);       
    insert into inscricoes values(1,1,2,1,TO_DATE('3-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(2,1,2,8,TO_DATE('5-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(3,1,2,9,TO_DATE('6-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(4,2,1,1,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),11);
    insert into inscricoes values(5,2,1,11,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(6,2,1,4,TO_DATE('5-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(7,3,2,1,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);
    insert into inscricoes values(8,3,2,9,TO_DATE('6-SEP-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(9,4,3,12,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(10,5,1,1,TO_DATE('7-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(11,6,1,1,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(12,6,1,11,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(13,7,1,1,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('10-FEB-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(14,7,1,11,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('7-MAR-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),17);
    insert into inscricoes values(15,7,1,4,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-JUL-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(16,7,1,2,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(17,8,3,12,TO_DATE('11-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),14);
    insert into inscricoes values(18,9,4,1,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(19,9,4,11,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(20,9,4,12,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(21,10,1,11,TO_DATE('11-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-FEB-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(22,10,1,1,TO_DATE('12-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);~
    commit;

  • Error occurred during quick migration: ORA-06502: numeric or value error

    I am very beginner on sql developer.I have a problem during a quick migration from mySQL db to Oracle DB as:
    step1: captured model processed successful
    step2: convered mode processed failed @ ORA-06502: numeric or value error
    My work environment:
    SQL Developer (2.1.1.64)
    Java platform: 1.6.0
    Oracle ide:2.1.1
    Ojdbc5.jar
    Oracle server ver. 9i
    mySQL Datatype: datetime (default_value: 0000-00-00 00:00:00) ,float,varchar(100),int(11)
    Please help me!
    Thanks in advance!
    Vien.

    kgronau wrote:
    could you please log into MySQL using mysql-utility, then change to the db (use <your mysql db) and provide the output of
    desc bars_eoptHi kgronau,
    Thanks for your response. Below is the table "bars_eopt" description from MySQL db. (first row is a description) sorry about the display is not in line as typing.
    Field     Type     Collation     Null     Key     Default     Extra     Privileges     Comment
    Bar_Index     int(11)          NO     PRI     0          select,insert,update,references
    Recipe     varchar(100) latin1_swedish_ci NO     MUL               select,insert,update,references
    Date_Time     datetime          NO          0000-00-00 00:00:00          select,insert,update,references
    ThresholdCurrent float          NO          0          select,insert,update,references     
    SlopeEfficiency     float          NO          0          select,insert,update,references     
    Pmax      float          NO          0          select,insert,update,references     
    Voltage_at_Imax     float          NO          0          select,insert,update,references     
    SeriesResistance     float          NO          0          select,insert,update,references     
    PeakWavelength     float          NO          0          select,insert,update,references     
    FWHM     float          NO          0          select,insert,update,references     
    CentroidWavelength float          NO          0          select,insert,update,references     
    Efficiency_at_Imax float          NO          0          select,insert,update,references     
    ForwardVoltage     float          NO          0          select,insert,update,references     
    FW_90_Percent     float          NO          0          select,insert,update,references     
    Emitter_at_Ith     float          NO          0          select,insert,update,references     
    Emitter_at_Imax float          NO          0          select,insert,update,references     
    Delta_Emitter      float          NO          0          select,insert,update,references     
    LOT_ID     varchar(100)     latin1_swedish_ci NO     MUL               select,insert,update,references     
    Part_Number     varchar(100)     latin1_swedish_ci     NO     MUL               select,insert,update,references     
    Pak_Number     int(11)          NO          0          select,insert,update,references     
    Pak_Position     int(11)          NO          0          select,insert,update,references     
    Tracer     int(11)          NO          0          select,insert,update,references     
    OCR     varchar(100)     latin1_swedish_ci NO                    select,insert,update,references     
    Inspection_Result varchar(100)     latin1_swedish_ci     NO                    select,insert,update,references     
    Inspection_Defect varchar(100)     latin1_swedish_ci     NO                    select,insert,update,references     
    Facette     varchar(1000)     latin1_swedish_ci     NO                    select,insert,update,references     
    Facette2     varchar(1000)     latin1_swedish_ci     NO                    select,insert,update,references     
    Upside     varchar(1000)     latin1_swedish_ci     NO                    select,insert,update,references     
    Downside     varchar(1000)     latin1_swedish_ci     NO                    select,insert,update,references     
    Thanks again and Best Regards,
    Vien.T

Maybe you are looking for

  • IPod Touch not recognised by Windows 8 or iTunes whilst in Recovery mode.

    Hello! I recently updated my iTunes account and during the update on syncing my iPod touch (5th gen) my iPod put itself in to recovery mode and now both iTunes and my computer (in Windows 8) wont recognise my iPod. I've followed the steps here> https

  • How can I get rid of a "speck" on the inside  of my iMac's display? please help me. T_T

    I have a Mid 2011 21.5 baseline iMac which I bought in March 2012. I noticed it just a couple of days ago, there's a tiny grey "speck" in the middle of my screen. I initially thought it was a speck of dust, which I tried to clean off with a microfibe

  • JNI and Websphere 3.5

    Hi there, I have an application that makes use of JNI technology. Basically, so as to work, the app must access a C++ DLL library via JNI, that in my case is a set of classes packaged in a jar file. The app works just fine when is run locally, but I?

  • How to crop video using ROI

    Hello, Would some one please help me? I have a loop which continuously aquire images from a camera and saves it to a video . I would like to crop a region of this video by passing the co-ordinates of a rectangle.After I have the cropped video, I woul

  • Presentation Variable manipulation

    Is it possible to manipulate the presentation variable. I dont need the exact value selected by the user to be set as the presentation variable value, instead I need a little modified value.Is it possible.