Trim on a clob returns ORA-22926 if the clob is the result of getClobVal()

I tried to trim whitespace from a CLOB, and got an ORA-22926 exception, which is strange since I did not supply a trim length. I eventually noticed that it only occurs when the CLOB is the result of the getClobVal method. The following code triggers the exception:
declare
  v_clob clob;
  v_xml xmltype;
  i pls_integer;
begin
  v_clob := '<node>test</node>';
  i := 0;
  loop
    exit when i > 12;
    v_clob := v_clob || v_clob;
    i := i + 1;
  end loop;
  v_clob := '<root>' || v_clob || '</root>';
  v_xml := xmltype(v_clob);
  v_clob := v_xml.getClobVal();
  v_clob := trim(v_clob);
end;
/ORA-22926: specified trim length is greater than current LOB value's length
ORA-06512: at line 17
Note that the exception is not triggered when the line v_clob := v_xml.getClobVal(); is removed. Any ideas why this exception occurs?
Oracle version is Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 .

And looking at your original example if you use XMLSERIALIZE rather than the depricated getClobVal() method the problem you descibe goes away..
SQL> declare
  2    v_clob clob;
  3    v_xml xmltype;
  4    i pls_integer;
  5  begin
  6    v_clob := '<node>test</node>';
  7    i := 0;
  8    loop
  9      exit when i > 12;
10      v_clob := v_clob || v_clob;
11      i := i + 1;
12    end loop;
13    v_clob := '<root>' || v_clob || '</root>';
14    v_xml := xmltype(v_clob);
15    v_clob := v_xml.getCLobVal();
16    v_clob := trim(v_clob);
17  end;
18  /
declare
ERROR at line 1:
ORA-22926: specified trim length is greater than current LOB value's length
ORA-06512: at line 16
SQL>
SQL>
SQL> declare
  2    v_clob clob;
  3    v_xml xmltype;
  4    i pls_integer;
  5  begin
  6    v_clob := '<node>test</node>';
  7    i := 0;
  8    loop
  9      exit when i > 12;
10      v_clob := v_clob || v_clob;
11      i := i + 1;
12    end loop;
13    v_clob := '<root>' || v_clob || '</root>';
14    v_xml := xmltype(v_clob);
15
16    select XMLSERIALIZE(DOCUMENT V_XML AS CLOB)
17      into V_CLOB
18      from dual;
19
20    v_clob := trim(v_clob);
21  end;
22  /
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>Edited by: mdrake on Feb 23, 2011 9:32 AM

Similar Messages

  • Oracle query on dblinked SQL Server tables returns ORA-00904 error

    Hi,
    I have created a dblink to a SQL Server database from Oracle using Generic Connectivity.
    The following query returns ORA-00904 Invalid Identifier error in the WHERE clause (tblEmp.Empno)
    SELECT "EmpNo","EmpName", "DeptName"
    FROM tblEmp@sqlserver,
    tblDept@sqlserver
    WHERE tblDept.DeptNo = tblEmp.Empno
    I had to enclose the column names in double quotes due to case sensitivitiy of the columns, but I can't do the
    same for the WHERE clause.
    1) So, how do I fix this error ?
    2) Also how do I include Deptno column with table alias in the columns list?
    (Deptno is ambiguous in Emp and Dept tables)
    Regards,
    Sam

    Alex
    Because using the aliases all the time can become annoying and lead to disparate standards when used by multiple developers. For a one-off query I would go with aliases in the query but if the linked tables are going to be interrogated extensively I would prefer to create vanilla views of the underlying tables so that the aliases aren't necessary.
    Just my opinion, it feels a bit cleaner to do it this way - you only do the work once in creating the view and then you don't need to worry about the case sensitivity of the linked database. You can also refer to the source in the name of the view so you don't have to think about different source databases with the same table names.
    Cheers
    Ben

  • ORA-22926: specified trim length is greater than current LOB value's length

    I am getting an ORA-22926 when passing a clob to the REPLACE function in 11gR2. I found this comment from someone else who experienced this:
    1. Identified the issue as the replace function that works on Oracle 10gR2, but not on 11g for the CLOB of some
    of the xml files for some character setting in the Oracle database.
    2. Submitted a service ticket to Oracle.
    3. Oracle provided a workaround solution.
    4. Implemented the Oracle workaround solution.
    Here is the link:
    http://www.alfred.edu/banner/docs/general84S1_release.pdf
    Does anyone know the workaround for this?
    Thanks

    I found a work around for this issue. REGEXP_REPLACE works as it should for clobs in 11g, so if you get ORA-22926 using the REPLACE function, try using REGEXP_REPLACE.

  • ORA-22926 Error

    We recently upgraded to 10g (using Oracle version 10.2.0.3.0).
    The problem is that we're trying to enter multi-byte characters (Chinese characters) into our TGRAMS application. However, when we try to save
    that text or ad data in the application, we get an "v_alltxtmstr" error (which is, according to one of our DBAs, an ora-22926 error). The changes then roll
    back.
    We know that the data fields in our TGRAMS application can handle the double-byte data because we've never had this problem before.
    This error seemed to occur after we upgraded to 10g. However, we're not sure if this acutally an oracle problem. Perhaps there's a problem with the handoff from Foxpro to Oracle???
    Our application is located on a PC that has a Chinese Operating Systerm (XP) and Office 2003 (Chinese). We copy and paste the Chinese text from a Word doc into the application.
    We tried typing the text as well as pasting the document into word pad first before inserting it into the application.
    So, we are at a lost. Any help you could provide would be appreciated.

    Are you using trim properly?
    IF lob_length > trim_length THEN
      dbms_lob.trim(your_lob, trim_length)
    END IF;Because you'll get ORA-22926 if the LOB length is < your trim specification.

  • Forms application returns "ORA-01403 no data found" exception on Windows 7

    Hi everyone,
    I am currently involved in an application compatibility project for an O/S migration from Windows XP to Windows 7.
    We have a legacy Oracle Dev6i P18 Forms application that has been working perfectly on Windows XP for the last decade or so. When we installed the same application on Windows 7, it returned a pop-up error message with the text: "ORA-01403 no data found" when performing a certain operation (clicking on a Submit button in a specific form). The same operation works successfully on Windows XP displaying the message "Submit has been successful".
    This error is well documented and the solution involves adding an exception handler to the faulting SQL statement(s) in order to handle the ORA-01403 exception. Unfortunately, the application is composed of compiled forms (.FMX) and we no longer have the source code so I can't implement this solution.
    I ran a file comparison utility (WinDiff from the Windows SDK) and confirmed that all the files in the application folder and the Oracle Dev6i P18 folder are identical on both the Windows XP and Windows 7 systems.
    I enabled tracing in SQLNet.ORA by configuring TRACE_LEVEL_CLIENT=SUPPORT (I know, too verbose) and other related settings on both systems and have uploaded the traces to my SkyDrive for public viewing:
    http://sdrv.ms/10BNYtI
    The traces show that the "ORA-01403" exception occurs many times on both Windows XP and Windows 7 systems as a result of various SQL statements being executed, for instance:
    SELECT TASK_ID,TASK_DETAIL_STATUS,ASSIGNED_DATE FROM TASK_DETAILS WHERE TASK_ID = :b1 AND TASK_DETAIL_STATUS = (SELECT ID FROM V_TASK_STATUS WHERE ABBREVIATION = 'PLANNED' ) FOR UPDATE OF TASK_DETAIL_STATUS,ASSIGNED_DATE
    UPDATE TASK_DETAILS SET ASSIGNED_DATE=NTMS_UTIL.GET_SERVER_DATE,TASK_DETAIL_STATUS=(SELECT ID FROM V_TASK_STATUS WHERE ABBREVIATION = 'ASSIGNED' ) WHERE ROWID = :b1
    ORA-01403: no data found.
    So the same error happens on both Windows XP and Windows 7.
    On Windows XP, the error is somehow handled, and does not cause the "Submit" operation to fail.
    On Windows 7, however, the error bubbles to the surface and is displayed to the user, thus halting the "Submit" operation.

    Thank you. I'm well aware that adding an exception handler is the classic solution to the ORA-01403 error. However, like I mentioned in my original post, I don't have the source code. All I have are the compiled .FMX forms so I can't implement such a solution:
    From my original post:
    This error is well documented and the solution involves adding an exception handler to the faulting SQL statement(s) in order to handle the ORA-01403 exception. Unfortunately, the application is composed of compiled forms (.FMX) and we no longer have the source code so I can't implement this solution.

  • PLSQL function body returning an sql report returns ORA-01403 No Data Found

    I am on APEX 3.1.2.00.02 and Oracle 10g.
    I am developing a report with SQL Query (PL/SQL function body returning SQL query) type. But on running the report I am getting
    report error:
    ORA-01403: no data found
    Region Source
    declare
      qry varchar2(32767);
    begin
      --Procedure call
      my_pkg.get_query(qry);
      htp.p(qry);
      return /*select 1 from dual */ qry;
    end;
    Procedure
    PROCEDURE get_query (V_QRY OUT VARCHAR2)
    IS
      qry varchar2(32767);
    begin
      qry := ' select name
         , max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Jan-09"
         , max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Feb-09"
         from MY_TABLE
         group by name ';
      V_QRY := qry;
    end;
    The query will be enhanced later to add more months and year based on user parameters once I am successfull in running report on this.
    I wish to use Query Specific Column names. I have seen this suggestion from Scott in a number of threads to use /*select 1 from dual */ with query but not working in my case.
    Can someone please suggest what can I do to make it working?
    Regards,
    Amir

    Firstly, have you unit tested the procedure (namely, within the SQL Workshop, SQL*Plus, SQL Developer,etc, etc.) to see if it produces the right output in the first place?
    If you have, and the query string generated is valid, try assigning the output to a page item (thus allowing you to view it in the session browser) or even pass the procedure output into the debug window (with the use of the wwv_flow.debug function). This might reveal some state or session change which is causing it not to return.You might find this easier to achieve if you change from a 'procedure and out parameter' combination to a 'function returning string' approach.
    Alternatively, try re-creating the report in a new region - occasionally I've come across weird bugs with report regions which resolved themselves in this manner.

  • Multi-row sub query returns  ORA-00904 :invalid identifier error

    I am creating a report from two tables that I am not joining. I want a single line for every row in table1 that meets a date range. Table2 can contain none or many rows for each recored in table1. I want to get up to two fields from table2.
    I was using a case statement to check if there was data and then an in-line query or subquery. Once again, the idea is to have a single line on the report for each table1 record.
    I get this error with the code below. It seems the nested multi-row subquery can not see the a.cr_mas_cr_no identifier.
    ORA-00904: "a"."cr_mas_cr_no": invalid identifier
    Any help is greatly appreciated,
    Sam
    select
    a.cr_mas_cr_no "CRNO", a.cr_mas_type "TYPE", a.cr_mas_status "CR Status",
    a.cr_mas_date_logged "Logged date", a.CR_REL_REQ_APP_DATE "RTP approved",a.CR_REL_REQ_RTP_DATE "RTP Date",
    a.cr_accepted_date "Complete", a.cr_mas_submitted_by "Requester",
    select doc_user FROM crrm_cr_documents WHERE doc_cr_number =a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'BD' ) "Bus Design",
    (select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TD' ) "Tech Design",
    (select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TE' ) "User acceptance test",
    case
    when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 0
    then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    end
    "RTP #1",
    case
    when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 1
    then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 2)
    end
    "RTP #2",
    a.CR_REL_REQ_RTP_BY "Released by",
    a.CR_ACCEPTED_BY "Post RTP User Acceptance",
    a.cr_mas_title "Title", a.cr_mas_id "ID"
    from
    crrm_crmaster a
    where
    (a.CR_REL_REQ_RTP_DATE >= :P1109_BEGDATE and (a.CR_REL_REQ_RTP_DATE <= :P1109_ENDDATE) and
    (a.cr_mas_status = 'Complete' or (a.cr_mas_status = 'Release Approved'and a.CR_REL_REQ_APP_DATE < :P1109_ENDDATE))
    Message was edited by:
    slavanaway

    Iceman,
    Thanks for the reply I will try your suggestion.
    I will try and explain why I think two subqueries (an in-line query with a subquery?) are required. I will use the creation of the column RTP #1 as the example as the RTP #2 column is only different in the rownum selected.
    Looking only at the lines that fail, here is my analysis. (If I rem out the two case lines the query runs, I just don't get two columns of data I need.) I will only examine the first case as the second is changed to extract the second approval via the rownum = 2 criteria. The first statement checks there is at least one RTP approval stored for the request and then gets the user who approved the request if the test is true.
    case when
    (select count(appr_user) from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') > 0
    then
    The above part works fine and the correct count of approvals is returned.
    (select appr_user from (select * from crrm_cr_approvals where appr_cr_no=a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    end
    "RTP #1",
    I moved the parenthesis to the correct location. There can be multiple approvals for a given parent record. Some parent records need one, some need two approvals. If I replace
    (select appr_user from (select * from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    with
    (select appr_user from approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP' and rownum = 1)
    The correct result is returned because it returns exactly one row as rownum=1 limits the query. When rownum = 2 then the query returns null as the rownum never gets to two as the rownum column is built via the set created by the second subquery.
    The subquery builds a set of approvals for a specific "cr_no" and appr_type of "RTP". the outer query then looks at the rownum of the second query
    Here is where I got the rownum information from;
    http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    So here is what I think is happening;
    1. Main query From and Where are processed. This should provide the "set" for the query
    2.The from subqueries for RTP #1 and RTP #2 should be able to access the a.cr_mas_cr_no field and build a set from the approvals table.
    3.The RTP #1/2 subquery (inline maybe a better description?) would then get the correct row from the from subquery.
    The error "invalid identifier" refers to the a.cr_mas_cr_no field. I assume it means it can not resolve the table alias inside the subquery.
    So maybe your grouping would help, I will try.
    Sam

  • Using clobs and ORA-01704: string literal too long

    Hi,
    I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
    I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
    Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
    I still receive the error
    java.sql.SQLException: ORA-01704: string literal too long
    I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
    Any advice you have here is greatly appreciated.
    Thanks,
    Joe

    Hi,
    I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
    I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
    Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
    I still receive the error
    java.sql.SQLException: ORA-01704: string literal too long
    I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
    Any advice you have here is greatly appreciated.
    Thanks,
    Joe

  • ORA-22275 inserting into the CLOB column using ODBC input parameters

    Hi all,
    I'm having problem with INSERT into the CLOB column via bound input parameters.
    After calling SQLExecDirect() I'm getting following error:
    [Oracle][ODBC][Ora]ORA-22275: invalid LOB locator specified
    Adding defaults to the table definitions does not help. If I embed parameter values into the SQL statement - everything works just fine.
    I use Oracle 9.2 with latest Oracle ODBC driver 9.2.0.4 under Windows XP.
    Any ideas appreciated...
    Vlad
    Code looks like this:
    SQLBindParameter(hstmt,1,...);
    SQLBindParameter(hstmt,2,...);
    SQLBindParameter(hstmt,3,...);
    SQLExecDirect(hstmt,...);
    SQL statement looks like this:
    insert into tst_table (id,str_fld,clob_fld1,clob_fld2) values (50, ? , ? , ?)
    Table looks like this:
    CREATE TABLE tst_table (
         id          number (10,0)     NOT NULL ,
         str_fld          nvarchar2 (50)     NOT NULL ,
         clob_fld1     nclob          NOT NULL ,
         clob_fld2     nclob          NOT NULL ,
         CONSTRAINT PK_tst_table PRIMARY KEY
              id
    I tried to add defaults to the table, but result is the same:
    CREATE TABLE tst_table (
         id          number (10,0)               NOT NULL ,
         str_fld          nvarchar2 (50)               NOT NULL ,
         clob_fld1     nclob     default EMPTY_CLOB()     NOT NULL ,
         clob_fld2     nclob     default EMPTY_CLOB()     NOT NULL ,
         CONSTRAINT PK_tst_table PRIMARY KEY
              id

    You need to provide the data at execution time (i.e. SQL_LEN_DATA_AT_EXEC(0) in the SQLBindParameter followed by a series of SQLPutData calls). If you go to Metalink
    Top Tech Docs | Oracle ODBC Driver | Scripts & Sample Code
    has some sample code that shows you how to do this.
    Justin

  • Order_by in set_block_property returns ORA-01785

    Hello.
    We have a problem with using function in set_block_property with order by when using union sentence.
    Our code looks like:
    set_block_property('block', default_where, 'id = '||:item||'
    UNION ALL
    SELECT ROWID,column1,column2,column3,... FROM table WHERE
    id = '||:item);
    set_block_property('block', order_by, 'function(column1), column2');
    Form returns error: ORA -01785 : ORDER BY item must be the number of a SELECT-list expression
    We know, that with union we should use numbers in order by instead of column names. But it doesn't work.
    If we do not use UNION, then order_by with function works.
    How can we solve this problem?
    Thanks.
    Edited by: DejanH on Sep 10, 2008 8:03 AM

    Not sure you can ever get Forms to handle that complicated a query using default block processing.
    Since it looks like your block is display-only, I would create a record group with the query and order by, populate it, and then step through the record group row-by-row moving the values to the block (which would then be a control-block rather than a base-table block). Of course, if your query selects more than a few hundred rows, this is not a good solution.

  • A In-line view query works with 8.1.6 but returns ORA-1008 with 8.1.7

    Hello Gurus,
    The following query works fine with 8.1.6 but returns
    ORA-1008: not all variables bound
    with 8.1.7.
    Here is the query:
    SELECT y.node_id , y.parent_node_id
    FROM ( SELECT x.node_id
    ,x.parent_node_id
    FROM ( SELECT a.node_id
    ,a.parent_node_id
    FROM xor_hs_base_details a
    WHERE a.node_id <>
    a.parent_node_id
    AND a.base_id=1
    ) x
    CONNECT BY PRIOR x.node_id =
    x.parent_node_id
    START WITH x.parent_node_id = 1
    ) y
    WHERE y.node_id IN ( SELECT node_id
    FROM xor_hs_transactions
    WHERE hierarchy_id = 1
    AND created_by
    = 'system'
    AND committed_on IS NULL
    Any ideas??
    TIA.
    ...Atul

    After having a closer look at metalink it seems to be obvious, that Forms 6i (8.0.6.) only supports user exits generated with the 8.0.6. precompiler.
    If this is the case new questions follow:
    Is there a way to get a 8.0.6. precompiler?
    Is it possible to connect to a 8.1.5. database with such a user exit? Does anybody have corresponding experiences?
    Our customer uses a 8.1.7. database. What about connecting to that database with the user exit?
    /Ralph

  • Convert DD to DMS using sdo_coord_ops = 101 returns ORA-13199

    Hi,
    I need to convert lat/long DD to DMS.
    There is an operation in sdo_coord_ops (coord_op_id = 101) to do that but returns ORA-13199 when i try sdo_cs.add_preference_for_op
    I know that i can do that conversion with a function (Re: SDO_UTIL.BEARING_TILT_FOR_POINTS in a Select statement - thanks Simon!).
    How i know which operation that exists in sdo_coord_ops are actually implemented or not?
    Thanks!

    Well, if you check the documentation it's quite clear: Coordinate Systems (Spatial Reference Systems)
    Of course you could also run something like this:
    select co.coord_op_id,
           co.coord_op_name,
           com.coord_op_method_name,
           com.is_implemented_forward,
           com.is_implemented_reverse
    from sdo_coord_ops co,
         sdo_coord_op_methods com
    where co.coord_op_id = 101 and
          com.coord_op_method_id = co.coord_op_method_id;
    0 = not implemented, 1 = implemented.

  • OCITransCommit() returns ORA-01013 for correctly committed transaction

    I had the following issue which seems to me a critial bug in Oracle 11g:
    Breaking an oracle transaction asynchronously with OCIBreak() while transaction is being committed with OCITransCommit() did result in a correctly committed transaction on the database server. However OCITransCommit() returned ORA-01013 (user requested cancel of current operation) which is inconsistent. It should never happen that the transaction is correctly committed and OCITransCommit() returns anything other than OCI_SUCCESS.
    My assumption is that the transaction is only committed on the database server if the OCITransCommit() returns OCI_SUCCESS. Or is this assumption not always correct?
    Oracle version 11.2.0.3.0 64bit (Linux)

    As Karthick says, perhaps the Call Interface forum is a better place to ask.
    However, as a guess on my part (I've rarely had a need to go directly into OCI calls) from what I know of the internal workings of transactions on Oracle, the COMMIT operation is an atomic (if that's the right word to use here) operation. When you issue a COMMIT from your code, it doesn't go off to the database, do loads of work committing your data and writing it to the disks etc. before execution is returned to your code, it is a very basic instruction to the database to commit the data, which then goes off and does that in the background, whilst execution is returned immediately to the calling code, and Oracle in the background can take it's time getting the data written, and can present the data to your session and others, as if it is actually on the tables. This is all handled using the SCN and the logs internally and users don't have to worry about it (usually) because it all appears on the front end as though the data exists and is written on the tables.
    So, I'm curious as to how you (or the OCI calls) are managing to issue a "break" to try and break a commit from happening. Without seeing code it's hard to see how you are testing this.
    I've just looked up the documentation for TransCommit...
    http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci17msc006.htm#LNOCI13112
    and I see you have the option of "Waiting" for the LGWR to write the transaction to the online redo logs, so that's a possible scenario for breaking, though I imagine you'd have to get in quickly with the break from another thread if the one thread is waiting for the commit.
    Intersting part of the docs...
    >
    Under normal circumstances, OCITransCommit() returns with a status indicating that the transaction has either been committed or rolled back. With global transactions, it is possible that the transaction is now in doubt, meaning that it is neither committed nor terminated. In this case, OCITransCommit() attempts to retrieve the status of the transaction from the server. The status is returned.
    >
    Still, it would be interesting to see the test code to reproduce this.... just my morbid curiosity for low level coding.... ;)

  • SDO_TUNE.EXTENT_OF returns ORA-06533: Subscript beyond count

    Hi,
    I'm trying to get the MBR of a dataset I've just loaded via an Oracle dump file from another source. I am using sdo_tune.extent_of to get the information, but the following error message is returned:
    select sdo_tune.extent_of('LR_PRM_IACS','GEOM') from dual
    ERROR at line 1:
    ORA-06533: Subscript beyond count
    ORA-06512: at "MDSYS.SDO_TUNE", line 1410
    I've looked up the meaning of the error and am none the wiser. There are just over 790000 records in the table. This shouldn't be too big to be handled, or is this possible? How else can I get the MBR for the dataset?
    Many thanks
    Sharon

    Hi Andriy
    I am Jorge Barba
    The author of the note you are following to setup the NCI demo.
    1. Regarding errors in sql*loader: Total logical records rejected: 55844
    We are aware of that and we just ignored those errors as this was done just for demo purposes.
    2. Regarding the second error
    Can you try the procedure in the tutorial, Use this link to go to the tutorial, build_patients sections:
    http://www.oracle.com/technology/obe/11gr1_db/datamgmt/nci_semantic_network/nci_semantics_les01.htm#t3
    If this still gives error, try the query alone to see if still gives the same error
    Regards!
    Jorge

  • Appending 2 CLOBs- Facing ORA-06502

    Hi All,
    Am trying to append a CLOB variable to another CLOB variable.
    Declare
    l_dest CLOB := ' ';
    l_src CLOB;
    CURSOR C1 IS
    <select cOLUMN_NAME1 FROM hz_parties>
    Begin
         FOR tmp_rec in C1
         LOOP
              Calls a procedure get_msg and outputs the data into l_src
    CLOB variable
              get_msg(tmp_rec.column_nam1,l_src);
              DBMS_LOB.APPEND(l_dest,l_src);
    END LOOP;
    END;
    The procedure is able to append the data to l_dest CLOB variable.But it is erroring out when the
    size of the l_dest CLOB variable reaches to 26213.
    Following error is thrown
    Code - ORA-06502: PL/SQL: numeric or value error.
    I have to put all the information fetched from the table into a CLOB variable. Finally i will be passing this CLOB variable to a API.
    I have gone through all the info about the DBMS_LOB.append,but culdnt able to resolve it....?
    If anyone has come across this situation.please let me know how to resolve it ??

    Exception is raised, when i call the DBMS_LOB.APPEND(l_dest,l_src);
    If i filter out the select statement in the cursor say rownum < 70; It is successfully appending the details to the l_dest CLOB. But if there are records with more than 70, then it is erroring out.
    get_msg(tmp_rec.column_nam1,l_src) is the procedure which just fetches the following
    fnd_message.set_name ('XXAAA', 'XXAA_VALIDATION');
    fnd_message.set_token ('source_info',pi_some_parameter);
    l_src := fnd_message.get;
    l_src := l_src||CHR(10)||CHR(10);

Maybe you are looking for

  • Batch number in Scheduling Agreement

    Hi All Where we can maintain the Batch number in Scheduling Agreements and in line item Release? Please suggest Thanks

  • Muse tooltip widget

    I have inserted a tooltip widget on the home page of a website www.guidetothelakes.co.uk mid-way on the left. if you hover over the widget it opens as it should, click on one of the entries and it takes you to the relevant page. All Okay. Now if you

  • A little help in AWT.. (reading a textfield from another class)

    I got this Panel with a varying number of TextFields (to input a matrix). so i did (in the Panel sub-class) TextField Determinant[] = new TextField[l*l];           for (int i = 0; i < l*l; i++)                add(Determinant[i] = new TextField(""+i))

  • Not able to change dekstop background

    model     : hp- r007tx os             : windows 8 (64 bits) when i go to personalise setting and change the desktop background . it automatically changes back to its default backround... what to do

  • I can't see some of the pictures in iOS 7

    The missing photos appear with the text JPG, but not all of them are gone. Does anybody know what's wrong??