Created index with DESC with USER_IND_COLUMNS. COLUMN = ' SYS_NC00023$ '.

On Oracle 11.2, I observed below
create index ind_jperson_1 on d_jperson(convict_ref);
create index ind_jperson_2 on d_jperson(driver_ref DESC);

select index_name,table_name,column_name,column_position,descend
  from USER_IND_COLUMNS where  table_name='D_JPERSON'

INDEX_NAME     TABLE_NAME     COLUMN_NAME     COLUMN_POSITION     DESCEND
IND_JPERSON_2     D_JPERSON     SYS_NC00023$     1     DESC
IND_JPERSON_1     D_JPERSON     CONVICT_REF     1     ASC
How to find the true picture of this index column?

Hello

DBA_IND_EXPRESSIONS can help you find the real column name.

And it is an expected behavior in Oracle. Have you noticed anything else pre 11.

Concerning
Anurag

Tags: Database

Similar Questions

  • Create indexes with NOLOGGING option

    Hello

    Can you please provide solution on the following scenario?

    If I create indexes with NOLOGGING Tablespace that is created with the LOGGING option, option can you please let me know what are the effects on the database?

    If I create indexes using NOLOGGING on Tables that are created with the LOGGING option, can you please let me know that it is to increase performance during the creation / rebuild indexes?

    Thank you

    Published by: user12088323 on December 28, 2010 12:45

    Published by: user12088323 on December 28, 2010 12:47

    user12088323 wrote:
    The database is in log mode archive. I would like to create indexes with NOLOGGING option on the tables to increase performance. The tables are created with the LOGGING option. Can you please let me know it's to create a bad effect on the database? If so, please explain.

    Thank you

    Published by: user12088323 on December 28, 2010 16:37

    NOLOGGING will cease to produce data AGAIN... for which you want to execute the instructions.
    Nothing wrong... it is created by ORACLE ;-)

    read this and cross with your process. You can do it with nologging option.

    http://www.Oracle.com/technetwork/database/RDB/0804-NOLOGGING-option-130004.PDF

    hope you understood

  • Performance problem of creating index with LOB/CLOB content

    Hello

    I have a problem with indexing performance with a table containing columns of text
    also a clob and a lob column.

    Indexing with 20,000 lines takes about 1 hour on 11.2.0.4 with the last batch of patches 12 on
    win x 64.

    on a 11.2.0.1, the process is done in a few minutes.

    So what can I do to find out where is the problem?

    I use filter auto and basic lexer.
    Operating system is W 2008 R2 SP and latest patches. OS lang is English.
    DB is installed with AL32UTF8 and German and English language packs.

    also watched and ctx_user_index_errors and pending and there is no error or waiting in lines.
    After the index is created, everything works fine. during the creation of index no other user is connected to the database.

    so why 11.2.0.1 is so much faster than 11.2.0.4?
    some advice for me?

    Thank you!

    Hello

    so I solved all my problems.

    So I made two changes:

    1. I declared the variable theNotiz2 for recording the output for the raw text of the column NOTIZ (is a clob), add the output to the Out-Clob parameter

    2. I used the same variable for the--> this blob field caused an error with line with lob is not locked... so I said a second variable for this and that solved the problem.

    normally, I think it should work with 1 variable... but is an acceptable workaround.

    Performance now is OK because the procedure, I can set on which the documents I want to do a search or not.

    Second thing, but has nothing to do with Oracle: my frontend application makes a ZIP for each insert in a column lob and if the ctxhx does not index the content, the MDC, and before calling the conversion of plain text, so I have to make a decompression of the blob...

    so for now, all problems solved. Thank you for your support.

  • Cannot create Index with an If statement

    Hello:

    I would run the code to create an index on a given table, but only if the index does not exist. Here's what I have so far...

    DECLARE
    c_Count NUMBER;
    BEGIN
    SELECT COUNT (*) FROM c_Count
    OF DBA_INDEXES
    WHERE TABLE_NAME = 'SOME_TABLE_NAME '.
    AND INDEX_NAME = "SOME_INDEX_NAME."
    AND OWNER = 'SOME_OWNER. '
    AND TABLE_OWNER = "SOME_OWNER";
    IF c_Count = 0 THEN

    CREATE INDEXES SOME_OWNER. SOME_INDEX ON SOME_OWNER. UNE_TABLE (SOME_KEY);
    END IF;
    END;

    The SELECT INTO statement works well alone.
    Boredom comes with the IF statement. I get the following error message:

    PLS-00103: encountered the symbol "CREATE" when waiting for one of the following values: begin case declare exit for goto if loop...

    This is the typical error saying that the syntax is incorrect, and that the parser was expecting something else after the IF-THEN statement. Any ideas on what may be a problem? Thanks in advance.

    Jerry

    Hello

    You must use EXECUTE IMMEDIATE to the DDL in PL/SQL.

    DECLARE
       c_Count NUMBER;
    BEGIN
       SELECT COUNT(*)
         INTO c_Count
         FROM DBA_INDEXES
        WHERE TABLE_NAME = 'SOME_TABLE_NAME'
          AND INDEX_NAME = 'SOME_INDEX_NAME'
          AND OWNER = 'SOME_OWNER'
          AND TABLE_OWNER = 'SOME_OWNER';
       IF c_Count = 0 THEN
          EXECUTE IMMEDIATE 'CREATE INDEX SOME_OWNER.SOME_INDEX ON SOME_OWNER.SOME_TABLE(SOME_KEY)';
       END IF;
    END;
    

    Kind regards

  • Failed to create index with imdp

    I am trying to import an image with the following command:

    Impdp user/pass DIRECTORY = SCHEMAS DUMPFILE = fump.dmp = originally_schema REMAP_SCHEMA = originally_schema:new_schema TABLE_EXISTS_ACTION = DATA_PUMP_DIR replace old = REMAP_TABLESPACE: new

    I don't know how the dump has been exported.

    Source DB version: 11.2.0.4

    Destination DB version: 11.2.0.1

    Everything works fine until it comes to the creation of index:

    Processing object type SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX

    ORA-39083: Type what INDEX failed to create object error:

    ORA-06550: line 2, column 1:

    PLS-00306: wrong number or types of arguments in the call to "CREATE_INDEX.

    ORA-06550: line 2, column 1:

    PL/SQL: Statement ignored

    Because sql is:

    BEGIN

    ctxsys.driimp.create_index('I_SRC_NAME','SOURCES',User,'ID','2','NAME','1','1020','32','8130','33',, NULL, NULL, 0,'Y','ON COMMIT','12582912',, NULL, null);

    ctxsys.driimp.set_object('DATASTORE','DIRECT_DATASTORE',0);

    ctxsys.driimp.set_object ('TYPE ',' CHAR_)

    Hope you can help me.

    & then you cannot use V11.2.0.4 expdp use impdp since V11.2.0.1

    expdp should include VERSION = 11.2.0.1

  • CREATE INDEX with ON DUPLICATE

    Hello

    I use Oracle10g Express (v10.2.0). What is given the equivalent query in Oracle for SQL Server query below?

    CREATE UNIQUE INDEX uix_NumberUnique ON UserInfo(UserID, Number)
    WITH (IGNORE_DUP_KEY = ON)

    I appreciate your inputs.

    Thank you
    Jonathan

    Here is an example

    SQL> create table t (no integer primary key);
    
    Table created.
    
    SQL> exec dbms_errlog.create_error_log('T','T_ERR')
    
    PL/SQL procedure successfully completed.
    
    SQL> insert into t
    select no
      from (
              select 1 no from dual union all
              select 2 no from dual union all
              select 1 no from dual
           )
    log errors into t_err('Insert Error') reject limit unlimited;         2    3    4    5    6    7    8  
    
    2 rows created.
    
    SQL> select * from t
      2  /
    
            NO
    ----------
             1
             2
    
    SQL>  exec dev_util.print_table('select * from t_err')
    ----------------------------------------------------------------------------------------------------
    Field Name                      Field Value
    ----------------------------------------------------------------------------------------------------
    ORA_ERR_NUMBER$               : 1
    ORA_ERR_MESG$                 : ORA-00001: unique constraint (ARBORU.SYS_C00407493) violated
    ORA_ERR_ROWID$                :
    ORA_ERR_OPTYP$                : I
    ORA_ERR_TAG$                  : Insert Error
    NO                            : 1
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • Field in the list with 2 columns

    I am creating listfield with two columns as follows [2 |]  Cokes].

    There is an example on how to do this?

    There is an article on the basis of knowledge to developers to add checkbox to a field, but I don't see anything on the creation of several columns.

    Maybe I can get away with adding a field of text instead of a checkbox or have two fields next to the list and sync.

    any suggestions?

    ListField on nature has a great column.

    You can override drawListRow() to ListFieldCallback to divide each row number of columns.

    In this case, you will need to control the width of each column using the class font getAdvance() method that returns the width of the displayed string. And if you combine graphics and text in columns, you will need to also use getWidth() instance method of the Bitmap class to calculate the width of each column.

  • Declare a type of table with multiple columns

    I have a table with a column of type, and I want to create one with two columns.

    My type is:
    create or replace type "NUMBER_TABLE" in the table of the number;

    And I use it in function:

    FUNCTION GetValues()
    return NUMBER_TABLE
    as
    results NUMBER_TABLE: = NUMBER_TABLE();
    Start
    Select OrderId bulk collect in: results from (select * from tbl_orders);
    -Other code...
    end;

    I want select it be like this:
    Select OrderId, OrderAddress bulk collect into: results from (select * from tbl_orders);

    How to do this?

    Is that what you are looking for:

    CREATE OR REPLACE TYPE two_col_rec AS OBJECT (empno NUMBER, ename VARCHAR2(10))
    /
    
    CREATE OR REPLACE TYPE two_col_table AS TABLE OF two_col;
    /
    
    CREATE OR REPLACE FUNCTION GetValues RETURN two_col_table AS
       results two_col_table := two_col_table();
    BEGIN
       SELECT two_col(empno, ename) BULK COLLECT INTO results FROM emp;
       --
       RETURN results;
    END;
    /
    show errors
    
  • How to create indexes on the ordered collection of XMLTYPE table?

    I use Oracle 11.2.0.2.

    Basically, my XML documents have a 3-level hierarchy:

    event

    + - action [1: n]

    + - param [1: n]

    I try to create indexes on the tables of the orderly collection, but cannot get the right syntax...

    I created a table with an XMLType object-relational column:

    CREATE TABLE T_C_RMP_MNTRNG_XML_FULL_IL4 (
      MESSAGE_ID NUMBER(22,0) NOT NULL ENABLE,
      XML_EVAL_ID NUMBER(22,0),
      VIN7 VARCHAR2(7 BYTE),
      FLEET_ID VARCHAR2(50 BYTE),
      CSC_SW_VERSION VARCHAR2(100 BYTE),
      RECEIVED DATE,
      XML_CONTENT SYS.XMLTYPE ,
      DWH_LM_TS_UTC DATE NOT NULL ENABLE,
      CONSTRAINT PK_C_RMP_MNTRNG_XML_FULL_IL4 PRIMARY KEY (MESSAGE_ID)
    ) NOLOGGING TABLESPACE CATALOG
    VARRAY "XML_CONTENT"."XMLDATA"."action" STORE AS TABLE "T_OR_MON_ACTION" (
      NOLOGGING TABLESPACE "CATALOG"
      VARRAY "param" STORE AS TABLE "T_OR_MON_ACTION_PARAM" (
      NOLOGGING TABLESPACE "CATALOG"
      ) RETURN AS LOCATOR
    ) RETURN AS LOCATOR
    XMLTYPE XML_CONTENT STORE AS OBJECT RELATIONAL XMLSCHEMA "http://mydomain.com/cs.xsd" ELEMENT "monitoring";
    
    
    
    
    

    I execute the SELECT statement:

    SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, UNIXTS_TO_DATE(ACTION_TIMESTAMP) ACTION_TIMESTAMP
    FROM T_C_RMP_MNTRNG_XML_FULL_IL4, 
    XMLTABLE( 
      'for $i1 in /monitoring , 
      $i2 in $i1/action            
      return element r {              
      $i1/eventId,              
      $i2            
      }' 
      PASSING XML_CONTENT COLUMNS 
      EVENT_ID VARCHAR(40) PATH 'eventId', 
      ACTION_SUB_ID INTEGER PATH 'action/actionSubId', 
      ACTION_TYPE VARCHAR2(100) PATH 'action/type', 
      ACTION_TIMESTAMP NUMBER(13,0) PATH 'action/time' 
    ) T2 
    WHERE ( 
      EVENT_ID IS NOT NULL AND ACTION_SUB_ID IS NOT NULL 
    )
    
    
    
    
    

    The plan of the explain command looks like this (sorry, don't know how to get it formatted any 'eye-team'):

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

    | ID | Operation | Name                        | Lines | Bytes | TempSpc | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |                             |  1609K |  6316M |       |  6110K (1) | 20:22:11 |

    |*  1 |  HASH JOIN |                             |  1609K |  6316M |   111 M |  6110K (1) | 20:22:11 |

    |   2.   TABLE ACCESS FULL | T_C_RMP_MNTRNG_XML_FULL_IL4 |   582K |   104 M |       |  5241 (1) | 00:01:03 |

    |*  3 |   TABLE ACCESS FULL | T_OR_MON_ACTION |    32 M |   117G |       |   105K (2) | 00:21:08 |

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

    Information of predicates (identified by the operation identity card):

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

    1 - access ("NESTED_TABLE_ID"= "T_C_RMP_MNTRNG_XML_FULL_IL4"." ("SYS_NC0001300014$")

    filter (CAST (SYS_XQ_UPKXML2SQL (SYS_XQEXVAL (SYS_XQEXTRACT ((SYS_XMLGEN ("T_C_RMP_MNTRN XMLCONCAT

    G_XML_FULL_IL4 ". "" $ SYS_NC00017 ", NULL, SYS_XMLCONV ("T_C_RMP_MNTRNG_XML_FULL_IL4". "SYS_NC00012$", 0.32,

    (('EC1EEF23FD023A27E04032A06D930A8D', 3, 3783, 1)), SYS_MAKEXML ('EC1EEF23FD023A27E04032A06D930A8D', 3780,

    'T_C_RMP_MNTRNG_XML_FULL_IL4 '. "' SYS_NC00008$ ', 'SYS_ALIAS_0 '. ((("' SYS_NC_ROWINFO$ ')),'/ ID ', NULL), 0,.

    0,20971520,0), 50.1, 2) AS VARCHAR (40)) IS NOT NULL)

    3 filter (CAST (TO_NUMBER (TO_CHAR ("SYS_ALIAS_0". "actionSubId")) AS INTEGER) IS NOT NULL) "

    Note

    -----

    -dynamic sample used for this survey (level = 2)

    -Construction detected no optimized XML (activate XMLOptimizationCheck for more information)

    The XML schema looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:storeVarrayAsTable="true" oraxdb:flags="2105639" oraxdb:schemaURL="http://mydomain.com/cs.xsd" oraxdb:schemaOwner="MYUSER" oraxdb:numProps="23">
      <xs:element name="monitoring" oraxdb:propNumber="3785" oraxdb:global="true" oraxdb:SQLName="monitoring" oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="monitoring757_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element maxOccurs="unbounded" ref="action" oraxdb:propNumber="3780" oraxdb:global="false" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="action756_COLL" oraxdb:SQLCollSchema="MYUSER"/>
            <xs:element ref="reservationType" oraxdb:propNumber="3781" oraxdb:global="false" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="softwareVersion" oraxdb:propNumber="3782" oraxdb:global="false" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="eventId" oraxdb:propNumber="3783" oraxdb:global="false" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="vin" oraxdb:propNumber="3784" oraxdb:global="false" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="action" oraxdb:propNumber="3790" oraxdb:global="true" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="action754_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element ref="type" oraxdb:propNumber="3786" oraxdb:global="false" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element maxOccurs="unbounded" ref="param" oraxdb:propNumber="3787" oraxdb:global="false" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="param753_COLL" oraxdb:SQLCollSchema="MYUSER"/>
            <xs:element ref="actionSubId" oraxdb:propNumber="3788" oraxdb:global="false" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="time" oraxdb:propNumber="3789" oraxdb:global="false" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="type" type="xs:string" oraxdb:propNumber="3791" oraxdb:global="true" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="type751_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="param" oraxdb:propNumber="3794" oraxdb:global="true" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="param750_TAB" oraxdb:defaultTableSchema="MYUSER">
        <xs:complexType oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER">
          <xs:sequence>
            <xs:element minOccurs="0" ref="value" oraxdb:propNumber="3792" oraxdb:global="false" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
            <xs:element ref="key" oraxdb:propNumber="3793" oraxdb:global="false" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="value" type="xs:string" oraxdb:propNumber="3795" oraxdb:global="true" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="value748_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="key" type="xs:string" oraxdb:propNumber="3796" oraxdb:global="true" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="key747_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="actionSubId" type="xs:integer" oraxdb:propNumber="3797" oraxdb:global="true" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="actionSubId746_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="time" type="xs:integer" oraxdb:propNumber="3798" oraxdb:global="true" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="time745_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="reservationType" type="xs:string" oraxdb:propNumber="3799" oraxdb:global="true" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="reservationType744_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="softwareVersion" type="xs:string" oraxdb:propNumber="3800" oraxdb:global="true" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="softwareVersion743_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="eventId" type="xs:string" oraxdb:propNumber="3801" oraxdb:global="true" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="eventId742_TAB" oraxdb:defaultTableSchema="MYUSER"/>
      <xs:element name="vin" type="xs:string" oraxdb:propNumber="3802" oraxdb:global="true" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="vin741_TAB" oraxdb:defaultTableSchema="MYUSER"/>
    </xs:schema>
    
    
    
    
    

    How can I create an index on these tables of the ordered collection to improve performance?

    I found the example at http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb_rewrite.htm#ADXDB5859 but am not able to apply to this particular case...

    Thank you in advance...

    If the schema is not annotated and XS: Integer and XS: String are mapped to types of data NUMBER and VARCHAR2 (4000), so you must use in your query to avoid typecasting unnecessary operations.

    You must also use XMLTABLEs chained when accessing a parent/child instead of a FLWOR expression relationship, otherwise the CBO cannot rewrite the XQuery query correctly (maybe it's fixed in the latest version).

    If you make these changes, the plan should show the cleaner predicates:

    SQL > SELECT EVENT_ID, MESSAGE_ID, ACTION_TYPE, ACTION_SUB_ID, ACTION_TIMESTAMP

    2 FROM test_table

    3 XMLTABLE ('/ monitoring ')

    4 COLUMNS XML_CONTENT OF PASSAGE

    5 WAY of VARCHAR2 (4000) EVENT_ID "ID."

    6 actions for XMLTYPE PATH 'action '.

    (7) T1,

    8 XMLTABLE ('/ action')

    Shares of PASSAGE 9 COLUMNS

    NUMBER of ACTION_SUB_ID 10 PATH "actionSubId."

    11 PATH of VARCHAR2 (4000) ACTION_TYPE "type."

    12 WAY of NUMBER ACTION_TIMESTAMP 'time '.

    (13) T2

    14 WHERE EVENT_ID IS NOT NULL

    15 AND ACTION_SUB_ID IS NOT NULL

    16;

    Execution plan

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

    Hash value of plan: 1763884463

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |                 |   109.   220K |     6 (17). 00:00:01 |

    |   1.  THE MERGE JOIN.                 |   109.   220K |     6 (17). 00:00:01 |

    |*  2 |   TABLE ACCESS BY INDEX ROWID | TEST_TABLE |    11.   352.     2 (0) | 00:00:01 |

    |   3.    INDEX SCAN FULL | SYS_C007567 |    11.       |     1 (0) | 00:00:01 |

    |*  4 |   JOIN TYPE.                 |   109.   216K |     4 (25) | 00:00:01 |

    |*  5 |    TABLE ACCESS FULL | T_OR_MON_ACTION |   106 S 216K |     3 (0) | 00:00:01 |

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

    Information of predicates (identified by the operation identity card):

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

    2 - filter("TEST_TABLE".") (' SYS_NC00012$ ' IS NOT NULL)

    4 - access("SYS_ALIAS_0".") NESTED_TABLE_ID "=" TABLE_TEST. " ("' SYS_NC0000800009$ ')

    filter ("SYS_ALIAS_0". "NESTED_TABLE_ID"="TABLE_TEST" "." " ("SYS_NC0000800009$")

    5 - filter("SYS_ALIAS_0"." actionSubId» IS NOT NULL)

    Note

    -----

    -dynamic sample used for this survey (level = 2)

    Now, if it is still necessary, everything boils down to choosing a technique for index NULL values:

    -composite index with a column not zero or constant

    -FBI

    -bitmap image

    Choose the one that best fits your data, the selectivity and activity on the tables.

  • create xmlindex structured with multiple columns reflecting different XPath expressions

    I run a XMLEXISTS query to return documents that contain a specific search template. The search model is based on two distinct XPATHS. I tried to create an XML Index structured to support the request. While I can make it work when I specify that a XPATH, I can't make it work when I specify both.

    Oracle version: 11.2.0.3

    extendeddata / / DESC

    Name                                      Null?    Type

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

    U NOT NULL VARCHAR2 (14)

    XMLCONTENT NOT NULL SYS. XMLTYPE BINARY STORAGE

    ROWINSERTDATE NOT NULL DATE

    XMLSIZE NOT NULL NUMBER (10)

    DATAIMPORTID NOT NULL VARCHAR2 (100)

    MESSAGEFLOWNAME NOT NULL VARCHAR2 (200)

    Table is partitioned by month on ROWINSERTDATE

    XMLType column stored as files secure.

    Here's the query...

    SELECT u, xmlcontent

    To extendeddata

    WHERE the XMLEXISTS ('declare namespace CAMT54 = "urn: iso: std: iso: 20022:tech:xsd:camt.054.001.02";)

    $p / CAMT54:Document / CAMT54:BkToCstmrDbtCdtNtfctn / CAMT54:Ntfctn [CAMT54:Acct / CAMT54:Id / CAMT54:IBAN = $iban]

    [and CAMT54:Ntry / CAMT54:CdtDbtInd = $ctddbtind]' Xmlcontent passing that 'p ',.

    "XXXXXXXXXXXXXXXXXXXXXX" AS "iban",.

    "DBIT" as "ctddbtind")

    AND rowinsertdate > = TO_DATE (' 2014-06-01 00:00:00 ',' ' SYYYY-MM-DD HH24:MI:SS)

    AND rowinsertdate < TO_DATE (' 2014-07-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS');

    Here's the index...

    CREATE INDEX EXTENDEDDATA_XML_IDX1 ON EXTENDEDDATA (XMLCONTENT)

    INDEXTYPE IS XDB. XMLIndex LOCAL SETTINGS (' XMLTable EXTENDEDDATAIBAN)

    XMLNAMESPACES ("urn: iso: std: iso: 20022:tech:xsd:camt.054.001.02" as "CAMT54").

    "/ CAMT54:Document / CAMT54:BkToCstmrDbtCdtNtfctn / CAMT54:Ntfctn"

    COLUMNS

    IBAN VARCHAR (34) PATH "CAMT54:Acct / CAMT54:Id / CAMT54:IBAN".

    CTDDBTIND varchar (4) PATH "CAMT54:Ntry / CAMT54:CdtDbtInd" ');

    CREATE INDEXES SEPA_PAY. EXTENDEDDATAIBAN_IDX1 ON EXTENDEDDATAIBAN (IBAN, CTDDBTIND)

    TABLESPACE SEPA_PAY_BIG_IDX;

    exec dbms_stats.gather_table_stats (ownname = > 'SEPA_PAY', tabname = > 'EXTENDEDDATA');

    Here is the plan to explain it...

    PLAN_TABLE_OUTPUT

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

    Hash value of plan: 417322092

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

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

    |   0 | SELECT STATEMENT |              |  1050 |   648KO |    38 (0) | 00:00:01 |       |       |

    |*  1 |  FILTER |              |       |       |            |          |       |       |

    |   2.   RANGE OF SINGLE PARTITION |              |  1050 |   648KO |    32 (0) | 00:00:01 |    16.    16.

    |   3.    TABLE ACCESS FULL | EXTENDEDDATA |  1050 |   648KO |    32 (0) | 00:00:01 |    16.    16.

    |   4.   SEMI NESTED LOOPS.              |     1.     6.     6 (0). 00:00:01 |       |       |

    |   5.    SEMI NESTED LOOPS.              |     1.     4.     4 (0) | 00:00:01 |       |       |

    PLAN_TABLE_OUTPUT

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

    |   6.     XPATH EVALUATION.              |       |       |            |          |       |       |

    |*  7 |     XPATH EVALUATION.              |       |       |            |          |       |       |

    |*  8 |    XPATH EVALUATION.              |       |       |            |          |       |       |

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

    Information of predicates (identified by the operation identity card):

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

    1 Filter (EXISTS (SELECT / * + < impossible >))

    7 - filter("P2"."$ C_01"="DBIT')

    8 - filter("P1"."$ C_01"="XXXXXXXXXXXXXXXXXXXXXX')

    PLAN_TABLE_OUTPUT

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

    Note

    -----

    -Construction detected no optimized XML (activate XMLOptimizationCheck for more information)

    The following is an extract from the XML file...

    " < document xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xmlns =" urn: iso: std: iso: 20022:tech:xsd:camt.054.001.02 "" >

    < BkToCstmrDbtCdtNtfctn >

    < GrpHdr >

    < MsgId > NFTTEST201311060150412 < / MsgId >

    < CreDtTm > 2013 - 11 - 06T 15: 04:12 < / CreDtTm >

    < / GrpHdr >

    < Ntfctn >

    < id > 00001 / < ID >

    < CreDtTm > 2013 - 11 - 06T 15: 04:12 < / CreDtTm >

    < Acct >

    < id >

    XXXXXXXXXXXXXXXXXXXXXX < IBAN > < / IBAN >

    < /ID >

    < / Acct >

    < do >

    < Amt CTL = "EUR" > 89.00 < / Amt >

    < CdtDbtInd > DBIT < / CdtDbtInd >

    < m > BOOK < / m >

    < BkTxCd >

    < Prtry >

    < Cd > 99999999999999 < CD >

    < / Prtry >

    < / BkTxCd >

    < NtryDtls >

    < TxDtls >

    < refs >

    < Course > 999_99999999 < / course >

    < MndtId > str1234 < / MndtId >

    < / refs >

    < AmtDtls >

    < TxAmt >

    < Amt CTL = "EUR" > 89.00 < / Amt >

    < / TxAmt >

    < / AmtDtls >

    < BkTxCd >

    < Domn >

    < Cd > < CD > SEPA

    < Montaut >

    < Cd > < CD > SEPA

    < SubFmlyCd > CORE < / SubFmlyCd >

    < / Montaut >

    < / Domn >

    < / BkTxCd >

    < RltdPties >

    < UltmtDbtr >

    str1234 < n > < /Nm >

    < id >

    < OrgId >

    < BICOrBEI > XXXXXXXX < / BICOrBEI >

    < Scout >

    str1234 < id > < /ID >

    < SchmeNm >

    str1 < Cd > < CD >

    < / SchmeNm >

    str1234 < HIRS > < / HIRS >

    < / Scout >

    < / OrgId >

    < /ID >

    < / UltmtDbtr >

    < Instantane >

    str1234 < n > < /Nm >

    < PstlAdr >

    < Ctry > IE < / Ctry >

    < AdrLine > str1234 < / AdrLine >

    < / PstlAdr >

    < / Instantane >

    < CdtrAcct >

    < id >

    XXXXXXXXXXXXXXXXXXXXXX < IBAN > < / IBAN >

    < /ID >

    < CTL > EUR < / CTL >

    < / CdtrAcct >

    < UltmtCdtr >

    str1234 < n > < /Nm >

    < id >

    < OrgId >

    < BICOrBEI > XXXXXXXX < / BICOrBEI >

    < Scout >

    str1234 < id > < /ID >

    < SchmeNm >

    str1 < Cd > < CD >

    < / SchmeNm >

    str1234 < HIRS > < / HIRS >

    < / Scout >

    < / OrgId >

    < /ID >

    < / UltmtCdtr >

    < Prtry >

    < Tp > default SEPA < /TP >

    < Pty >

    < id >

    < PrvtId >

    < Scout >

    < id > < /ID > XXXXXXXXXXXXX

    < / Scout >

    < / PrvtId >

    < /ID >

    < / Pty >

    < / Prtry >

    < / RltdPties >

    < Purp >

    str1 < Cd > < CD >

    < / Purp >

    < RmtInf >

    < Ustrd > str1234 < / Ustrd >

    < Strd >

    < CdtrRefInf >

    < Tp >

    < CdOrPrtry >

    < Cd > SCOR < CD >

    < / CdOrPrtry >

    str1234 < HIRS > < / HIRS >

    < /TP >

    < ref > str1234 < / Ref >

    < / CdtrRefInf >

    < / Strd >

    < / RmtInf >

    < / TxDtls >

    < / NtryDtls >

    < / try >

    < / Ntfctn >

    < / BkToCstmrDbtCdtNtfctn >

    < / document >

    Can someone help me build an index for the query above?

    Thank you.

    This should work better, with the caveat explained above:

    SELECT t.*
    FROM extendeddata t
    WHERE XMLEXISTS('declare default element namespace "urn:iso:std:iso:20022:tech:xsd:camt.054.001.02";(::)
                   /Document/BkToCstmrDbtCdtNtfctn/Ntfctn[Acct/Id/IBAN=$iban]'
            Passing Xmlcontent,
                    'XXXXXXXXXXXXXXXXXXXXXX' AS "iban"
               )
    and XMLEXISTS('declare default element namespace "urn:iso:std:iso:20022:tech:xsd:camt.054.001.02";(::)
                   /Document/BkToCstmrDbtCdtNtfctn/Ntfctn[Ntry/CdtDbtInd=$ctddbtind]'
            Passing Xmlcontent,
                    'DBIT' as "ctddbtind")
    AND rowinsertdate >= TO_DATE(' 2014-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')
    AND rowinsertdate < TO_DATE(' 2014-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')
    ;
    

    (see how the predicates in each XQuery expression corresponds to the structure of the index)

    BTW, this kind of "DIY" XMLEXISTS works just as well.

    It emulates what we would have hoped for a single XMLExists in the first place:

    SQL> SELECT t.*
      2  FROM extendeddata t
      3  WHERE rowinsertdate >= TO_DATE(' 2015-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')
      4  AND rowinsertdate < TO_DATE(' 2015-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')
      5  AND EXISTS (
      6    SELECT null
      7    FROM XMLTable(
      8           XMLNamespaces(default 'urn:iso:std:iso:20022:tech:xsd:camt.054.001.02')
      9         , '/Document/BkToCstmrDbtCdtNtfctn/Ntfctn'
     10           passing t.xmlcontent
     11           COLUMNS IBAN      VARCHAR2(34) PATH 'Acct/Id/IBAN'
     12                 , CTDDBTIND VARCHAR2(4)  PATH 'Ntry/CdtDbtInd'
     13         ) x
     14    WHERE x.iban = 'XXXXXXXXXXXXXXXXXXXXXX'
     15    AND x.ctddbtind = 'DBIT'
     16  ) ;
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 409033022
    
    ---------------------------------------------------------------------------------------------------------------
    | Id  | Operation                             | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
    ---------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                      |                       |     1 |   824 |     4  (25)| 00:00:01 |
    |   1 |  NESTED LOOPS                         |                       |     1 |   824 |     4  (25)| 00:00:01 |
    |   2 |   SORT UNIQUE                         |                       |     1 |    38 |     2   (0)| 00:00:01 |
    |   3 |    TABLE ACCESS BY INDEX ROWID BATCHED| EXTENDEDDATAIBAN      |     1 |    38 |     2   (0)| 00:00:01 |
    |*  4 |     INDEX RANGE SCAN                  | EXTENDEDDATAIBAN_IDX1 |     1 |       |     1   (0)| 00:00:01 |
    |*  5 |   TABLE ACCESS BY USER ROWID          | EXTENDEDDATA          |     1 |   786 |     1   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       4 - access("SYS_SXI_1"."IBAN"='XXXXXXXXXXXXXXXXXXXXXX' AND "SYS_SXI_1"."CTDDBTIND"='DBIT')
       5 - filter("ROWINSERTDATE">=TO_DATE(' 2015-06-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "ROWINSERTDATE"		   
  • error on 'create a table in select... '. "table with nested columns

    My Oracle 11.1 database, I have a problem with the nested table.

    on table with script
    CREATE TABLE TXV.IS_PODACI209
    (
      ID_OBJEKTA_IDENTIFIKACIJA  NUMBER(10),
      ID_OBJEKTA                 NUMBER(20),
      DATUM                      TIMESTAMP(6),
      TZ                         NUMBER(3),
      DATA1                      NUMBER(10),
      DATA2                      NUMBER(6),
      DATA3                      NUMBER(10),
      DATA4                      NUMBER,
      DATA5                      TXV.T_NTCIP_ILLUM_TABLE,
      DATA6                      NUMBER(10)
    )
    NESTED TABLE DATA5 STORE AS IS_PODACI209_STORE_TABLE
    TABLESPACE TXV_DATA
    PARTITION BY RANGE (DATUM)
    (  
      PARTITION P_201012 VALUES LESS THAN (TIMESTAMP' 2011-01-01 00:00:00')
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA,  
      PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA
    )
    NOCOMPRESS 
    NOCACHE
    NOPARALLEL
    MONITORING;
    
    
    CREATE INDEX TXV.IDX_IS_PODACI209_KOMPLEKS ON TXV.IS_PODACI209
    (ID_OBJEKTA_IDENTIFIKACIJA, ID_OBJEKTA, DATUM)
      TABLESPACE TXV_DATA
    LOCAL (  
      PARTITION P_201012
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA,  
      PARTITION MAXX
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA
    )
    NOPARALLEL;
    that has a nested type column:
    CREATE OR REPLACE TYPE TXV.t_ntcip_ILLUM_FMT as object
    (  BRIGHTNESS_LEVEL FLOAT
    ,   PHOTOCELL_DOWN   FLOAT
    ,   PHOTOCELL_UP  FLOAT
    );
    and I create a table (to copy table partitions in a third table) step to help:
    CREATE TABLE TXV.IS_PODACI209_STAGE NESTED TABLE DATA5 STORE AS IS_PODACI209_STAGE_1 AS SELECT * FROM TXV.IS_PODACI209 WHERE 1=2
    The problem is when I try to move using the partition:
    ALTER TABLE TXV.IS_PODACI209 EXCHANGE PARTITION P_201012 WITH TABLE IS_PODACI209_STAGE EXCLUDING INDEXES WITHOUT VALIDATION UPDATE GLOBAL INDEXES
    I get an error:
    ALTER TABLE TXV.IS_PODACI209
      EXCHANGE PARTITION P_201012
      WITH TABLE IS_PODACI209_STAGE
      EXCLUDING INDEXES
      WITHOUT VALIDATION
      UPDATE GLOBAL INDEXES
    Error at line 3
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
    but these tables are the same...

    someone had such a problem?

    concerning

    I think the UPDATE GLOBAL INDEXES is the origin of the problem.

    Try this,

    ALTER TABLE IS_PODACI209 EXCHANGE PARTITION P_201012 WITH TABLE IS_PODACI209_STAGE EXCLUDING INDEXES WITHOUT VALIDATION 
    

    Rebuild the indexes manually.

    And if I see your profile, you

    Messages total: 25
    Total issues: 16 (* 14 pending *)

    Always mark a thread as answered once you get the answer. It can save a lot of time for volunteers.

    G.

  • Index work only with a column of numbers?

    I created a table with a column of data type such as varchar2

    with index I executed the query
    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 2608167055

    ----------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 8. 2896 | 2 (0) | 00:00:01 |
    |* 1 | TABLE ACCESS FULL | BOPS_1 | 8. 2896 | 2 (0) | 00:00:01 |
    ----------------------------------------------------------------------------


    After creating Btree index on this column I executed the same query


    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 2608167055

    ----------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 8. 2896 | 2 (0) | 00:00:01 |
    |* 1 | TABLE ACCESS FULL | BOPS_1 | 8. 2896 | 2 (0) | 00:00:01 |
    ----------------------------------------------------------------------------



    There is no change between these to explain plans, no performance difference?



    is that B-TREE index works well with number data types?



    Thank you
    REDA

    There could be several reasons. After you create the index statistics gather e.g. also maybe your query returns a huge part of table index will be useless. I mean if you ask him % of 80 percent of one table, optimizer will probably not use index. Another reason, perhaps your table is too small, so oracle read both so the whole table, it is not necessary use index. etc...

    It is not on the varchar2 data type, if one of these conditions is tru that whatever your index of data type will not be used.

    Published by: Mustafa KALAYCI on 20.Eki.2010 10:14

  • How to create a table with editable column values.

    Hello world
    I think it's very simple, but I am unable to find how to do this. This is my requirement. I need to create a table with n columns and 1 line initially. the user must be able to enter data into this table and click of a button must insert the data into the database table. Also, there should be a button at the bottom of the table to add 1 line to the table.

    I know how to do the insertion of data, but can someone please let me know how to create a table which allows the user to enter data and how to create a line button Add 1?


    Thanks in advance!

    Raghu,

    Go through the tutorial of Toolbox Page & Advanced section of the Guide of the OFA table.

    Step 1 - you need to create EO & VO from this EO. This EO will be table of database where you want to insert the data.

    Step 2 - create an advanced table region. (See this section in table advanced for more details)

    Step 3 - attach this VO in the BC4J region advanced Table component.

    Kind regards
    GYAN

  • Creating table in the model with 80 columns

    Hello

    I am trying to create a model to display 80 columns, but in Word format, I get the message "you cannot create a table with more than 63 columns.
    Can how I put the 80 columns in the Template.rtf?

    Env: Suite Oracle E business 12
    Output required: Excel

    Thanks in advance.

    It's the MSword limitation and no BEEP, but indirectly there is a limitation of the BEEP ;)

    MSWord supports only maximum of 63 columns.
    As MS Word supports only the width of page maximum of 22 inches wide and 22 inches high.

    Option 1:

    Create a table with two columns
    Insert a table with 63 columns in the first cell,
    Insert a table with 63 columns in the second cell,
    How we can get rid of limitations columns.

    Option 2:

    If you want to use more than 63, then you use templates other than RTF. I recommend XSL.

  • Context with USER_DATASTORE with multi-column index returns no records

    Hi Expert,

    Based on this url: http://docs.oracle.com/cd/B28359_01/text.111/b28304/cdatadic.htm#i1006810

    I tried to create an oracle text index, but I could not retrieve the data

    Here is my script:

    create table items)

    Identification number,

    author varchar2 (80).

    title varchar2 (120),

    text (clob);

    Create procedure MyProc (rid of rowid, tlob in out nocopy clob) is

    Start

    C1 in (select author, title and text of the articles

    where rowid = RID)

    loop

    DBMS_LOB. WriteAppend (tlob, length (c1.title), c1.title);

    DBMS_LOB. WriteAppend (tlob, length (c1.author), c1.author);

    DBMS_LOB. WriteAppend (tlob, length (c1.text), c1.text);

    end loop;

    end;

    Start

    ctx_ddl.create_preference ('myud', 'user_datastore');

    ctx_ddl.set_attribute ("myud", "procedure", "MyProc");

    ctx_ddl.set_attribute ('myud', 'TYPE_SORTIE', 'CLOB');

    end;

    create index myindex2 on articles (text)

    indexType is ctxsys.context

    parameters ("DATASTORE myud");

    insert into articles (id, author, title) values (1, 'A', "AAAAAA"); validation;

    insert into articles (id, author, title) values (2, 'B', 'BATH'); validation;

    insert into articles (id, author, title) values (3, 'C', 'CCCCCC'); validation;

    insert into articles (id, author, title) values (4,'d "," DDDDDD ""); commit;

    EXEC CTX_DDL. SYNC_INDEX('myindex2','2M');

    Select * from items where contains (text, 'B', 1) > 0;  -This will display nothing.

    Can someone help me?

    Scott@orcl_11gR2 > create table (items)

    Number 2,

    3 author varchar2 (80).

    4 title varchar2 (120),

    5 text varchar2 (30))

    4 m

    Table created.

    Scott@orcl_11gR2 > create procedure MyProc

    2 (get rid of rowid,

    3 - nocopy clob clob nocopy not:

    4 tlob in out nocopy clob)

    5 is

    6 start

    7 C1 in

    8 (select author, title, text

    9 articles

    10 where rowid = RID)

    11 loop

    12 if c1.title is not null then

    13 dbms_lob.writeappend (tlob, length (c1.title), c1.title);

    14 end if;

    15 if c1.author is not null then

    16 - Add space between columns:

    17 dbms_lob.writeappend (tlob, 1, ' ');

    18 dbms_lob.writeappend (tlob, length (c1.author), c1.author);

    19 end if;

    20 if c1.text is not null then

    21 - Add space between columns:

    22 dbms_lob.writeappend (tlob, 1, ' ');

    23 - use Add to clob, instead of writeappend:

    24 dbms_lob.append (tlob, c1.text);

    25 end if;

    26 end of loop;

    27 end;

    28.

    Created procedure.

    Scott@orcl_11gR2 > display errors

    No errors.

    Scott@orcl_11gR2 > start

    2 ctx_ddl.create_preference ('myud', 'user_datastore');

    3 ctx_ddl.set_attribute ('myud', 'procedure', "MyProc");

    4 ctx_ddl.set_attribute ('myud', 'TYPE_SORTIE', 'CLOB');

    5 end;

    4 m

    PL/SQL procedure successfully completed.

    Scott@orcl_11gR2 > create index myindex2 on articles (text)

    2 indextype is ctxsys.context

    3 - Add empty_stoplist to the parameters, so the individual letters are indexed:

    4 parameters

    5 ("DATASTORE myud

    6 ctxsys.empty_stoplist of stoplist ')

    7.

    The index is created.

    Scott@orcl_11gR2 > insert all

    2 in the articles (id, author, title) values (1, 'A', "AAAAAA")

    3 in values (id, author, title) articles (2, 'B', 'BATH')

    4 in values (id, author, title) articles (3, 'C', 'CCCCCC')

    5 in articles (id, author, title) values (4,'d "," DDDDDD "")

    6 select * of the double

    7.

    4 lines were created.

    Scott@orcl_11gR2 > commit

    2.

    Validation complete.

    Scott@orcl_11gR2 > CTX_DDL EXEC. SYNC_INDEX('myindex2','2M')

    PL/SQL procedure successfully completed.

    Scott@orcl_11gR2 >-show what procedure produces:

    Scott@orcl_11gR2 > declare

    2 v_clob clob: = empty_clob();

    3. start

    4 C1 to

    5 (select rowid rid

    6 items)

    7 loop

    8 dbms_lob.createtemporary (v_clob, true);

    9 myproc (c1.rid, v_clob);

    10 dbms_output.put_line (v_clob);

    11 dbms_lob.freetemporary (v_clob);

    12 end loop;

    13 end;

    14.

    ABDELKRIM HAS

    BATH B

    CCCCCC C

    DDDDDD D

    PL/SQL procedure successfully completed.

    Scott@orcl_11gR2 >-show which is indexed:

    Scott@orcl_11gR2 > select token_text Dr. myindex2$ $I

    2.

    TOKEN_TEXT

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

    A

    ABDELKRIM

    B

    BATH

    C

    CHABOUNI

    D

    OUR

    8 selected lines.

    Scott@orcl_11gR2 > select * from articles where contains (text, 'B', 1) > 0

    2.

    ID

    ----------

    AUTHOR

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

    TITLE

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

    TEXT

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

    2

    B

    BATH

    1 selected line.

Maybe you are looking for

  • No mails a file with header showing the number of unread emails!

    My Mozilla Thunderbird works very well for several of my Gmail, Hotmail and Yahoo email accounts. However, for one of my Yahoo accounts, I have several records that show the number of unread in this folder but no mail mails that can be downloaded or

  • Maximum RAM for Y460N

    Hi all I want to update my RAM for my Lenovo Y460N, but I do not know the RAM max it can supports. Can someone advise me on this... COS of the user manual doesn't say RAM max... Thank you very much! Martin

  • Cannot delete the system Keychain key

    I have a bit of a problem to remove the keys (the keys) in the Keychain system on my iMac. Here's what happens: I go to Keychain Access and select system in the keychains list. I have unlock keychain using my admin password (the icon will change from

  • I get error DEP and closes when stitching in an Iphone4 on Itunes

    I have a desktop X 64 4 GB of ram, XP Pro, when I plug in my Iphone4 on itunes it gives me closure with error Data Execution Prevention attention.

  • How to add contacts to my Windows Live Hotmail account.

    I have already formed a group of contacts inside contact How can I add new details to this group? They are already hotmail contacts Thank you original title: Hotmail contacts and groups