Error assigning varchar2 value to an output varchar2 parameter

I do not understand why is the procedure erroring out while assigning value to an output parameter.
It gives ORA -06502 ; numeric or value error
character string buffer too small
Procedure is doing something like this
Procedure Test ( logs_tats out varchar2,
log_num out number,
check_num in number) as
v_stats varchar2(400);
begin
if (check_num = 0) then
v_stats := 'Check something and check something else';
end if;
if( check_num +3 <10) then
v_stats := v_stats || chr(13) || 'Check something and check something else';
end if;
if (check_num +5 <15) then
v_stats := v_stats || chr(13) || 'Check something and check something else';
end if;
log_stats := v_stats; -- gives error at this line
check_num :=0;
exception
when others
--raise_application_error()  statement
end Test;
I also tried with removing all 'chr(13)' that I am using and it still gives an error at very that line,
i tried doing a dbms_output to check the length of v_stats just before error and it is 287.
Is there any upper limit on the size of output varchar2 ?
thank you

How about you try posting the actual code and actual attempt to call it (SQL Plus is great for doing this).
Procedure Test ( logs_tats out varchar2,and then later
log_stats := v_stats; -- gives error at this lineYou misspelled the out parameter in the procedure declaration.
Some notes
1) use the code tags so your code stays readable
2) give us complete details including an oracle version
3) use some naming standard for your variables
   pi_ --> parameter in
   po_ -->parameter out
   l_  --> local
... etc
Makes life easier (pick any standard you find useful and easy to understand).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Error displaying numeric values with SPREADSHEET output

    Hi, I'm using Reports 10g R2 and I have all my reports with PDF output, they render just fine.
    I want to render some of them with SPREADSHEET output but don't know why in some case numeric values are rendered as ****** instead of the corresponding number.
    The same report shows numeric values correctly in PDF but no in some Excel cells, just SOME of them, not all.
    I know that Excel column is not short because the internal value of the cell are the asterisks.
    What could be happening?
    Thanks!

    Hi Ruby,
    please refer to some very basic documentation on CRM 2007 Webclient UI or the IC Webclient of CRM 4.0.
    What you are trying to do is create a value node and your code ABAP is wrong.
    Here a code sample. Typed it by hand so there might be errors in it.
    data:
      ls_struct  type /mystructure,
      lr_struct_ref type ref to data,
      lr_node type ref to cl_bsp_wd_value_node.
    ls_struc-/attribute1/ = 'Hallo Welt'.
    get reference of ls_struct into lr_struct_ref.
    create object lr_node
    exporting iv_data_ref = lr_struct_ref.
    typed_context->/yourNode/->collection_wrapper->add( lr_node ).
    cheers Carsten

  • PL/SQL Function call error while reading or assigning returned value

    Hi,
    I am getting the following error while tryih to read the value of the PL/SQL Function. I am calling a function in one of my PL/SQL Packages passing mutliple IN parametes and the function returns some value back. Now on BPEL side when I try to read the return value I am getting an error:
    *<summary>*
    empty variable/expression result.
    xpath variable/expression expression "/ns3:OutputParameters/ns3:TEST_FUNCTION" is empty at line 124, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns3:OutputParameters/ns3:TEST_FUNCTION" is not empty.
    *</summary>*
    Even though in the console when I check the Invoke Output Parameter it does shows me a valid value being retuned by a Function but when I am trying to Assgn this value to some variable using Assign Activity I get the above error.
    Even though all goes fine but looks like I am not able to read or assign the value returned from the Function.
    So just wondering if this even works as to me I have a very simple example and that seems not to work. Function is called successfully and is returning the value as I can see it in the BPEL console but when tryin to read or assign that value to some other variable I get the above error.
    Any ideas?
    Thanks

    This issue has come up a lot. The problem is with a mismatch between the version of JDeveloper and SOA. You'll encounter namespace issues if you use 10.1.3.1 in combination with 10.1.3.3 (or 10.1.3.4). You MUST synchronize both JDev and SOA to 10.1.3.3 or 10.1.3.4 (mixing 10.1.3.3 and 10.1.3.4 is OK). We changed when going to 10.1.3.3 by adding elementFormDefault="qualified" to the generated XSD. We used the default "unqualified" in 10.1.3.1. So you'll encounter namespace issues unless you're using 10.1.3.3 or higher JDev AND SOA. The fact that I see &lt;*db:*...&gt; tells me that you're using 10.1.3.1 JDeveloper. The correct solution is to upgrade your components.

  • Error when assigning a value to a class

    Hi,
    Here's what I have:
    package com.myprograms.tools1;
    public class A
    public long orderId;
    public int nameId;
    public int carId;
    public int anId;
    package com.myprograms.tools1;
    public class B
    public A classOfA;
    //MAIN Program
    import com.myprograms.tools1;
    public class getClass
    B b= new B();
    b.classOfA.orderId = 10029292;
    I get a Null Pointer Exception when I assign a value to the var.
    Can anybody help point out the problem?
    Thanks!

    What exactly is the error message... i.e. line numbers and class names...
    Example: Full thread dump Java HotSpot(TM) Client VM (1.5.0-beta2-b51 mixed mode, sharing
    "SIGINT handler" daemon prio=10 tid=0x03264410 nid=0xea0 waiting for monitor ent
    ry [0x080bf000..0x080bfa68]
            at java.lang.Shutdown.exit(Unknown Source)
            - waiting to lock <0x2b31a868> (a java.lang.Class)
            at java.lang.Terminator$1.handle(Unknown Source)
            at sun.misc.Signal$1.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)Okay, that was too funny... LOL...
    This example error is courtesy of me being a complete... Well, let's just say, that was dumb...
    It has almost been an hour since I launched off that little app...
    You know you did something wrong when you can actually hear the HardDrive and Fan slow down...
    Anyway... LOL... what are the errors, and what is the rest of the code ? or is it fixed now...
    - MaxxDmg...
    - ' He who never sleeps... '

  • Error in ECA when assigning the value to structures

    Hi,
    There are errors in ECA when we execute our function modules.               
    Say a script has 3 interfaces (just an example)
    1) In the first command interface, there is a reference to a structure which has 3 nested structures within, in which the inner most 3rd structure is filled.   
    2) In 2nd interface, the inner most structure in null.                      
    3) In third interface, it is trying to initialize only those elements       
    that were already initialized and we get a empty node error for the 3rd 
    nested structure, when it tries to assign the value .
    Here is the error message that we encounter
    "The Node IT_TABLE_INPUT_DATA[1]-DATA[2]-COMPARE_OPERATOR of Object VS_EDIT_LIST Does Not Exist"*     
    Please help us in resolving this issue.
    Thanks,
    Asha
    Edited by: Asha Nagaraj on Jan 19, 2009 11:57 AM

    Hi,
    We tried to parameterize in the node level rather than Struture level, still the same problem persists, becoz
    1. In the first command interface the value has been assigned to internal node
    2. In the second command interface there is no value to assign, so null value is assigned to that node
    3. in the third command interface, when it tries to assign the value to the node which was assigned "null" in the previous interface, we are encountering that issue. it is not able to find that node
    Let me know if u need further info.
    Thanks,
    Asha

  • Error Message F6804 Value Blank/Space invalid for account assignment elemen

    Dear Experts,
    We have a problem in Travel Management,
    I have created a trip for paid by company expenses only and entered cost distribution (fund, funds center and WBS) in the trip.
    When I transfer a trip to FI through transaction PRRW throughing error message "F6804 Value Blank/Space invalid for account assignment element for fund and FI313 No funds center entered/ derived in Item".
    The paid by com. expenses receipts of wage types credited with - positive amount in 2nd symbolic account offsetting entry and flagged W/CO also the symbolic code linked to linked  to Temprary clearing GL it is BS GL .
    I checked all the existing threads messages but I did not get solution.
    the problem comes up from our upgradation, 6 months back we upgraded to ECC 6.
    We don't have any problems in our old 4.7 system still it is working fine.
    I created OSS but still they did not solved and they are refering all passed notes.
    could any one give the solution to come out from this problem?
    Thanks and Regards,
    Satya

    Hi Satya,
    Basically the error is because of Funds Management which you have activated. Please check the note 1268001, 701291, 558295 & 936658 but i dont know will this be helpful or not.
    Regards,
    S.Srikanth
    Edited by: SrikanthS on Oct 26, 2010 11:17 AM

  • Re: Error, numeric or value error: character to number conversion error

    Can someone please please tell me why I'm getting this error and what I'm doing wrong? It looks like a simple error, "numeric or value error: character to number conversion error".
    My code is as follows:
    string connectionString = WebConfigurationManager.ConnectionStrings["DEMO_TEST"].ConnectionString;
    OracleConnection con = new OracleConnection(connectionString);
    OracleCommand cmd = new OracleCommand("DEMO.PKG_LOCATION_TYPE.INS", con);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add(new OracleParameter("@P_DESCRIPTION", OracleDbType.Varchar2, 60));
    cmd.Parameters["@P_DESCRIPTION"].Value = "Test_Description";
    cmd.Parameters.Add(new OracleParameter("@P_NAME", OracleDbType.Varchar2, 6));
    cmd.Parameters["@P_NAME"].Value = "Test_Name";
    cmd.Parameters.Add(new OracleParameter("@P_LOCATION_TYPE_CD", OracleDbType.Decimal, 4));
    cmd.Parameters["@P_LOCATION_TYPE_CD"].Direction = ParameterDirection.InputOutput;
    con.Open();
    try
    cmd.ExecuteNonQuery();
    catch
    //In case of an error
    finally
    con.Close();
    con.Dispose();
    And I recieve the following error block:
    Oracle.DataAccess.Client.OracleException was unhandled by user code
    Message="ORA-06502: PL/SQL: numeric or value error: character to number conversion error\nORA-06512: at line 1"
    Source="Oracle Data Provider for .NET"
    DataSource="demotest"
    Number=6502
    Procedure="DEMO.PKG_LOCATION_TYPE.INS"
    StackTrace:
    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
    at System.Web.UI.WebControls.Wizard.OnFinishButtonClick(WizardNavigationEventArgs e)
    at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e)
    at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args)
    at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ********************************************************

    Are the parameters in your procedure in the same order as they are created in this code? Oracle command works by position unless you change it to be BindByName.
    Failing that you seem to have defined a parameter (P_NAME) to have a length of 6, and are then setting it's value to a string with a length of 9.
    Also the in/output parameter is defined as type decimal. Is this correct? It is defined as InputOutput but you don't assign it any value.
    If these suggestions don't help then perhaps if you post the stored procedure you might get some more ideas.
    HTH
    Lyndon

  • How to check empty string and null? Assign same value to multiple variables

    Hi,
    1.
    How do I check for empty string and null?
    in_value IN VARCHAR2
    2. Also how do I assign same value to multiple variables?
    var_one NUMBER := 0;
    var_two NUMBER := 0;
    var_one := var_two := 0; --- Gives an error
    Thanks

    MichaelS wrote:
    Not always: Beware of CHAR's:
    Bug 727361: ZERO-LENGTH STRING DOES NOT RETURN NULL WHEN USED WITH CHAR DATA TYPE IN PL/SQL:
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is NOT null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Assigning a value to a substitute variable

    Hi, I would like to know if it is possible to assign a value to a substitute variable.
    This is what I'm doing:
    - Prompting user for input
    ACCEPT uom CHAR PROMPT 'Enter number of UOM system you would like: ' DEF '0'
    (displayed list of options are numbers 0-5)
    - Based on input, open corresponding file
    (start i:\utc\all\oracle\uom\uom_column_heading_&&uom..sql)
    Problem:
    - Default selection is 0, meaning use the CURRENT UOM system (a number, 1-5)
    - That being said, &&uom must be assigned a 1-5 value in order to open the file that corresponds to the CURRENT UOM system
    Let me know if any additional information is needed.
    Thanks!

    I apologize for the format. I tried to make it more legible, but was not able to. FYI: It appears to be easier to read in "Edit" view.
    Thanks, I tried the &&uom := your_function(); suggestion, but I am getting an error. It looks like the "value" of &&uom is being read in the assignment statement, not the variable name.
    I have copied the piece of the code, for your reference.
    ACCEPT uom CHAR PROMPT 'Enter number of UOM system you would like: ' DEF '0'
    DECLARE
    v_uom_sys_selection NUMBER;
    v_curr_uom_sys VARCHAR2 (50);
    v_uom_num NUMBER;
    BEGIN
    v_uom_sys_selection := to_number(&uom);
    v_curr_uom_sys := EG.GET_CURRENT_UOM();
    v_uom_num := eg.get_user_selected_uomnum(v_curr_uom_sys);
    &&uom := to_char(v_uom_num);
    dbms_output.put_line('v_uom_num = ' || v_uom_num);
    dbms_output.put_line('&&uom = ' || &&uom);
    END;
    --prompt "&&uom"
    start i:\utc\all\oracle\uom\uom_column_heading_&&uom..sql
    Below are the results I get when commenting out the &&uom := to_char(v_uom_num); line. NOTE: the "value" of &&uom = 0.
    v_uom_num = 1
    0 = 0
    If I leave that line in, I get the following error:
    PLS-00103: Encountered the symbol "0" when expecting one of the following:
    begin case declare end exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    The symbol "<an identifier> was inserted before "0" to continue.
    Message was edited by:
    user449676

  • INI: XOQ-01600: OLAP DML Error "ORA-01438: value larger than specified prec

    I have created a Time dimension in AWM 11.1.0.7.0B.
    I have added two Hierarchies to it. One Hierarchy has All Years, Year, Week, day. The second hierarchy has All Years, Year, Quarter.
    When I maintain the dimension, the following error occurs:
    An error has occurred on the server
    Error class: Express Failure
    Server error descriptions:
    INI: Error creating a definition manager, Generic at TxsOqConnection::generic<BuildProcess>
    INI: XOQ-01600: OLAP DML Error "ORA-01438: value larger than specified precision allowed for this column
    " while executing DML "SYS.AWXML!R11_LOAD_DIM('TIME.ALL_GREGORIAN_YEARS.LEVEL' SYS.AWXML!___R11_LONG_ARG_VALUE(SYS.AWXML!___R11_LONG_ARG_DIM 1) 'TIME.END_DATE.ATTRIBUTE' 'TIME.TIME_SPAN.ATTRIBUTE' 'TIME.LONG_DESCRIPTION.ATTRIBUTE' 'TIME.SHORT_DESCRIPTION.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_END_DATE.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_TIME_SPA.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_LONG_DES.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_SHORT_DE.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_TIME_SPA1.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_TIME_SPA2.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_TIME_SPA3.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_LONG_DES1.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_SHORT_DE1.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_TIME_SPA4.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_LONG_DES2.ATTRIBUTE' 'TIME.ALL_GREGORIAN_YEARS_SHORT_DE2.ATTRIBUTE' 'TIME.GREGORIAN_QUARTER_END_DATE.ATTRIBUTE' 'TIME.GREGORIAN_QUARTER_TIME_SPAN.ATTRIBUTE' 'TIME.GREGORIAN_QUAOLAP DML Error "%(1)s" while executing DML "%(2)s", Generic at TxsOqStdFormCommand::execute
    at oracle.olapi.data.source.DataProvider.callGeneric(Unknown Source)
    at oracle.olapi.data.source.DataProvider.callGeneric(Unknown Source)
    at oracle.olapi.data.source.DataProvider.executeBuild(Unknown Source)
    at oracle.olap.awm.wizard.awbuild.UBuildWizardHelper$1.construct(Unknown Source)
    at oracle.olap.awm.ui.SwingWorker$2.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:595)

    The most likely explanation is that you have a numeric attribute whose data type precision is less than that of the column it is mapped to. For example if you had an attribute with data type NUMBER(2) and you mapped it to a column with data type NUMBER(5), then you could get this error on load. Note that some of the attributes may not be visible in AWM. The offending SQL statement should be in the OUTPUT column of the CUBE_BUILD_LOG, but you may be able to fix this by just describing the view associated with the dimension. For example, here is the description of a TIME view created in 11.2..
      Name                            Null?    Type
    DIM_KEY                             VARCHAR2(60)
    LEVEL_NAME                             VARCHAR2(30)
    MEMBER_TYPE                             VARCHAR2(1)
    DIM_ORDER                             NUMBER
    END_DATE                             DATE
    TIME_SPAN                             NUMBER
    LONG_DESCRIPTION                        VARCHAR2(60 CHAR)
    SHORT_DESCRIPTION                        VARCHAR2(60 CHAR)
    MONTH_END_DATE                         DATE
    MONTH_TIME_SPAN                        NUMBER(5)
    MONTH_LONG_DESCRIPTION                    VARCHAR2(60 CHAR)
    MONTH_SHORT_DESCRIPTION                   VARCHAR2(60 CHAR)
    FISCAL_QUARTER_END_DATE                   DATE
    FISCAL_QUARTER_TIME_SPAN                   NUMBER(5)
    FISCAL_QUARTER_LONG_DESC                   VARCHAR2(60 CHAR)
    FISCAL_QUARTER_SHORT_DES                   VARCHAR2(60 CHAR)
    FISCAL_YEAR_END_DATE                        DATE
    FISCAL_YEAR_TIME_SPAN                        NUMBER(5)
    FISCAL_YEAR_LONG_DESCRIP                   VARCHAR2(60 CHAR)
    FISCAL_YEAR_SHORT_DESCRI                   VARCHAR2(60 CHAR)
    CALENDAR_QUARTER_END_DAT                   DATE
    CALENDAR_QUARTER_TIME_SP                   NUMBER(5)
    CALENDAR_QUARTER_LONG_DE                   VARCHAR2(60 CHAR)
    CALENDAR_QUARTER_SHORT_D                   VARCHAR2(60 CHAR)
    CALENDAR_YEAR_END_DATE                    DATE
    CALENDAR_YEAR_TIME_SPAN                   NUMBER(5)
    CALENDAR_YEAR_LONG_DESCR                   VARCHAR2(60 CHAR)
    CALENDAR_YEAR_SHORT_DESC                   VARCHAR2(60 CHAR)You can get the same information from user_cube_attributes
    SQL> select attribute_name, data_precision from user_cube_attributes where dimension_name = 'TIME' and data_type = 'NUMBER';
    ATTRIBUTE_NAME                 DATA_PRECISION
    TIME_SPAN
    MONTH_TIME_SPAN                    5
    FISCAL_QUARTER_TIME_SPAN              5
    FISCAL_YEAR_TIME_SPAN                   5
    CALENDAR_QUARTER_TIME_SPAN              5
    CALENDAR_YEAR_TIME_SPAN               5

  • Error getting return value from function

    Hello
    I'm getting a error calling a function with ODP.NET from C#
    Code:
    OracleCommand oraCom = new OracleCommand("NORMALIZACION.nif",oraCon);
    oraCom.CommandType = CommandType.StoredProcedure;
    OracleParameter param1 = new OracleParameter("numnif",OracleDbType.Varchar2);
    param1.Value= "73667866A";
    param1.Direction = ParameterDirection.Input;
    OracleParameter param2 = new OracleParameter("nif",OracleDbType.Varchar2);
    param2.Size = 10; //FIXME line
    param2.Direction = ParameterDirection.ReturnValue;
    oraCom.Parameters.Add(param1);
    oraCom.Parameters.Add(param2);
    oraCom.ExecuteNonQuery();
    nif_norm = oraCom.Parameters["nif"].Value.ToString();
    if i write the FIXME line i get a error (ORA-06502) complaining about the size, no matter the value i wrote.
    If i don't write the FIXME line, it works but nif_norm is always empty, although the function i call is a single return 'Hello';
    Where am I wrong??
    Any help, examples with varchar2 as return value???
    BTW: the same code with the MS provider for Oracle works fine.

    Good point -- i shall do so.
    What I think I'm missing, in my quest for ODP.NET competence, is a solid set of example code. I've searched around and found various fragements here and there, but when it comes to data access from .NET there must surely be some finitie set of possibilities (if we can discount bad practices like building dynamic SQL statements without bind variables).
    For example, possibly in increasing order of complexity ...
    * Read a single value from a SQL statement ... "select emp_name from emp where rownum < 2"
    * Read a single value by passing in a parameter ... "select emp_name from emp where user_id = :?"
    * read multiple values ... "select emp_name from emp where user_id in (:?,:?)"
    * execute a stored procedure with no in or out parameters
    * retreive a value from a function with no parameters
    * pass a parameter to a stored procedure
    * read an out parameter from a stored procedure
    Then work with in and out ref cursors, blobs, whatever.
    Thoughts?

  • SQL Error: ORA-12899: value too large for column

    Hi,
    I'm trying to understand the above error. It occurs when we are migrating data from one oracle database to another:
    Error report:
    SQL Error: ORA-12899: value too large for column "USER_XYZ"."TAB_XYZ"."COL_XYZ" (actual: 10, maximum: 8)
    12899. 00000 - "value too large for column %s (actual: %s, maximum: %s)"
    *Cause:    An attempt was made to insert or update a column with a value
    which is too wide for the width of the destination column.
    The name of the column is given, along with the actual width
    of the value, and the maximum allowed width of the column.
    Note that widths are reported in characters if character length
    semantics are in effect for the column, otherwise widths are
    reported in bytes.
    *Action:   Examine the SQL statement for correctness.  Check source
    and destination column data types.
    Either make the destination column wider, or use a subset
    of the source column (i.e. use substring).
    The source database runs - Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    The target database runs - Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    The source and target table are identical and the column definitions are exactly the same. The column we get the error on is of CHAR(8). To migrate the data we use either a dblink or oracle datapump, both result in the same error. The data in the column is a fixed length string of 8 characters.
    To resolve the error the column "COL_XYZ" gets widened by:
    alter table TAB_XYZ modify (COL_XYZ varchar2(10));
    -alter table TAB_XYZ succeeded.
    We now move the data from the source into the target table without problem and then run:
    select max(length(COL_XYZ)) from TAB_XYZ;
    -8
    So the maximal string length for this column is 8 characters. To reduce the column width back to its original 8, we then run:
    alter table TAB_XYZ modify (COL_XYZ varchar2(8));
    -Error report:
    SQL Error: ORA-01441: cannot decrease column length because some value is too big
    01441. 00000 - "cannot decrease column length because some value is too big"
    *Cause:   
    *Action:
    So we leave the column width at 10, but the curious thing is - once we have the data in the target table, we can then truncate the same table at source (ie. get rid of all the data) and move the data back in the original table (with COL_XYZ set at CHAR(8)) - without any issue.
    My guess the error has something to do with the storage on the target database, but I would like to understand why. If anybody has an idea or suggestion what to look for - much appreciated.
    Cheers.

    843217 wrote:
    Note that widths are reported in characters if character length
    semantics are in effect for the column, otherwise widths are
    reported in bytes.You are looking at character lengths vs byte lengths.
    The data in the column is a fixed length string of 8 characters.
    select max(length(COL_XYZ)) from TAB_XYZ;
    -8
    So the maximal string length for this column is 8 characters. To reduce the column width back to its original 8, we then run:
    alter table TAB_XYZ modify (COL_XYZ varchar2(8));varchar2(8 byte) or varchar2(8 char)?
    Use SQL Reference for datatype specification, length function, etc.
    For more info, reference {forum:id=50} forum on the topic. And of course, the Globalization support guide.

  • Assign a value to a global variable - form personalization

    Hi All,
    We have a requirement in which we want to display a message depending upon the out parameter of the procedure in form personalization.
    We are using 'Builtin' with the buitin type 'Execute a Procedure'.
    And the argument passed is :
    *='declare
    l_request_id Number;
    l_out_come VARCHAR2(10);
    begin
    apps.xx_sr_email_pkg1.xx_sr_email_p1
    ('''||${GLOBAL.XX_CUST_ACCOUNT_ID.VALUE}||''',
    '''||${GLOBAL.XX_INCIDENT_ID.VALUE}||''',
    '''||${GLOBAL.XX_EMAIL_TYPE.VALUE}||''',l_request_id);
    :GLOBAL.XX_REQUEST_ID := l_request_id;
    end'*
    But its not assigning the value of l_request_id to the gloabal variable XX_REQUEST_ID.
    Can you please help?
    Thanks

    I don't have a solution but a work around.
    What if you create a function that accepts the same in parameters and returns the message.
    And then you create an action of the type message and in the message you call the function such as
    = select xx_sr_email_pkg1.sr_email_f1 .... from dual
    Sandeep Gandhi

  • Report suddenly showing ORA-20001: Error fetching column value: ORA-06502:

    Hi,
    Some reports in my applications are suddenly showing:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    instead iof the data they used to show.
    In my development system I can fix this by:
    1. changing the column alias in my sql
    select 'a' alias1 from dual becomes
    select 'a' alias2 from dual
    2. SAVE CHANGES
    3. change column alias back to original
    select 'a' alias2 from dual becomes
    select 'a' alias1 from dual
    4. reorder columns back to original in the 'report attributes' tab
    alias1 is now at the bottom of my colum list - i just bounce it up to column 4 using the up arrows
    5. SAVE CHANGES
    then everything starts working OK again.
    There seems to be nothing wrong with my sql as I can make it works on a new page or after I run the above steps, so I guess something is breaking somewhere but I cannot work out what.
    Has anyone else seen this? Does anyone know the cause? Does anyone have a fix for this that does not involve the above steps (plus redeployment to prodcution and all the work that involves)?
    I am seeing this on version 2.3 and 3.0.
    Thanks,
    Martin

    Hi Scott,
    I think this is want you want (sorry it's not easy to read):
    wp.suite_id - Database Column NUMBER - Report Column Based on LOV
    wp.project_id - Database Column NUMBER - Report Column Based on LOV
    wp.application_order wp_order - Database Column NUMBER - Report Column Standard
    lpad(wp.work_package_id,5,'0')||' - '||wp.name wp_name - Database Column NUMBER/VARCHAR2 - Report Column Standard
    pt.application_order pt_order - Database Column NUMBER - Report Column Standard
    pt.name pt_name - Database Column VARCHAR2 - Report Column Standard
    substr(pt.description,1,30) description - Database Column VARCHAR2 - Report Column Standard
    pt.application_tier - Database Column VARCHAR2 - Report Column Based on LOV
    pt.application_method - Database Column VARCHAR2 - Report Column Based on LOV
    pt.TECH_LEAD_ID - Database Column NUMBER - Report Column Based on LOV
    This report has no link columns and no derived columns.
    Regards,
    Martin

  • Replicat error: ORA-12899: value too large for column ...

    Hi,
    In our system Source and Target are on the same physical server and in the same Oracle instance. Just different schemes.
    Tables on the target were created as 'create table ... as select * from ... source_table', so they have a similar structure. Table names are also similar.
    I started replicat, it worked fine for several hours, but when I inserted Chinese symbols into the source table I got an error:
    WARNING OGG-00869 Oracle GoldenGate Delivery for Oracle, OGGEX1.prm: OCI Error ORA-12899: value too large for column "MY_TARGET_SCHEMA"."TABLE1"."*FIRSTNAME*" (actual: 93, maximum: 40) (status = 12899), SQL <INSERT INTO "MY_TARGET_SCHEMA"."TABLE1" ("USERID","USERNAME","FIRSTNAME","LASTNAME",....>.
    FIRSTNAME is Varchar2(40 char) field.
    I suppose the problem probably is our database is running with NLS_LENGTH_SEMANTICS='CHAR'
    I've double checked tables structure on the target - it's identical with the source.
    I also tried to manually insert this record into the target table using 'insert into ... select * from ... ' statement - it works. The problem seems to be in the replicat.
    How to fix this error?
    Thanks in advance!
    Oracle GoldenGate version: 11.1.1.1
    Oracle Database version: 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    NLS_LANG: AMERICAN_AMERICA.AL32UTF8
    NLS_LENGTH_SEMANTICS='CHAR'
    Edited by: DeniK on Jun 20, 2012 11:49 PM
    Edited by: DeniK on Jun 23, 2012 12:05 PM
    Edited by: DeniK on Jun 25, 2012 1:55 PM

    I've created the definition files and compared them. They are absolutely identical, apart from source and target schema names:
    Source definition file:
    Definition for table MY_SOURCE_SCHEMA.TABLE1
    Record length: 1632
    Syskey: 0
    Columns: 30
    USERID 134 11 0 0 0 1 0 8 8 8 0 0 0 0 1 0 1 3
    USERNAME 64 80 12 0 0 1 0 80 80 0 0 0 0 0 1 0 0 0
    FIRSTNAME 64 160 98 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    LASTNAME 64 160 264 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    PASSWORD 64 160 430 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    TITLE 64 160 596 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    Target definition file:
    Definition for table MY_TAEGET_SCHEMA.TABLE1
    Record length: 1632
    Syskey: 0
    Columns: 30
    USERID 134 11 0 0 0 1 0 8 8 8 0 0 0 0 1 0 1 3
    USERNAME 64 80 12 0 0 1 0 80 80 0 0 0 0 0 1 0 0 0
    FIRSTNAME 64 160 98 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    LASTNAME 64 160 264 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    PASSWORD 64 160 430 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    TITLE 64 160 596 0 0 1 0 160 160 0 0 0 0 0 1 0 0 0
    Edited by: DeniK on Jun 25, 2012 1:56 PM
    Edited by: DeniK on Jun 25, 2012 1:57 PM

Maybe you are looking for

  • Contact Picture sync behavior

    Problem: I add a new contact picture on the iPhone, later sync: the pic loses its resolution and becomes a low-res 'Address Book' picture that appears in the top-right corner when someone calls. I know the topic of contact pic has been hashed out lot

  • Partner Function Tab

    - Hi All,    Need some help on the following: we´re implementing the 'Accounts' functionality of CRM V4.0 for the SAP Portal V6.0 and when we access the 'Relationship' tab inside a contact person, depending on the relationship you create for that con

  • Web Services Communication failed in 2.5 but not in 2.2

    I have a web services interface that was generated via netbeans for the wireless toolkit 2.5 and 2.5.1ea. When I run the connection everything is retrieved properly and using debug all returned objects are correct. In this particular example the mapp

  • My keyboard just stopped working help mèeeeee

    My key board wont work all buttons are dead

  • FI & CRM Integration ???

    Hi Gurus Can any body please explain me what is the Integration and Process configuration between FI and CRM. Thanks in Advance... Meenakshi.N