Text index CONTEXT Oracle which gives bad results!

Expert Oracle Text,

I'm on Oracle 11.2.0.2 on Solaris 10 and have implemented the Oracle text features using the CONTEXT index type, and I'm getting a few problems in. I have a need for research with joker as % and giving the wrong exit. Here's the scenario where I get incorrect results:
 

--creating preferences etc 
exec   ctxsys.ctx_ddl.create_preference ('cust_lexer', 'BASIC_LEXER'); 
exec   ctxsys.ctx_ddl.set_attribute ('cust_lexer', 'base_letter', 'YES'); -- removes diacritics 
exec   ctxsys.ctx_ddl.create_preference ('cust_wl', 'BASIC_WORDLIST') 
exec   ctxsys.ctx_ddl.set_attribute ;    ('cust_wl', 'SUBSTRING_INDEX', 'true'); 

--table set up 
CREATE TABLE TEST_USER 
( 
  FULL_NAME  VARCHAR2(64 CHAR)                  NOT NULL, 
  LAST_NAME  VARCHAR2(64 CHAR)                  NOT NULL 
); 


CREATE INDEX TEST_USER_IDX5 ON TEST_USER 
(FULL_NAME) 
INDEXTYPE IS CTXSYS.CONTEXT 
PARAMETERS('LEXER cust_lexer WORDLIST cust_wl SYNC (ON COMMIT)'); 

--data set up 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('Supervisor upervisor', 'upervisor'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('JOSEPH WILSON', 'WILSON'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('CHRISTOPHER Phil', 'TAYLOR'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('PAUL HERNANDEZ', 'HERNANDEZ'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('Betty Jipes', 'Jones'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('One Anna', 'Anna'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('Three Anna', 'Anna'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('Two Anna', 'Anna'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('Four Anna', 'Anna'); 
Insert into TEST_USER 
   (FULL_NAME, LAST_NAME) 
Values 
   ('Gary Barrow', 'Barrow'); 
COMMIT; 

--query using CONTAINS which gives WRONG output - because out intention is to return only those strings that START WITH the letter P but it returns another string that has P not at the starting!! 

SQL> select full_name from test_user where contains(full_name,'P%')>0; 

FULL_NAME 
---------------------------------------------------------------- 
PAUL HERNANDEZ 
CHRISTOPHER Phil 

-- I need output as follows in which the second value is not returned...meaning 'CHRISTOPHER Phil' should NOT be returned by the CONTAINS clause just as the LIKE operator below doesn't return it. 
SQL> select full_name from test_user where full_name like 'P%'; 

FULL_NAME 
---------------------------------------------------------------- 
PAUL HERNANDEZ 
Please can anyone suggest what to do about it?

Thank you
OrauserN

No, you can skip all those, if you use SUBSTRING_INDEX.

Tags: Database

Similar Questions

  • LEFTOUTER join querry which gives bad result

    Hello

    I have tables like below.when I perform a left outer join issue IDs and startdate he gives invalid results.when I write in request

    It does not correct result because there is no data for 16 jan. It should give no results. But it shows all records. How do I solve this problem

    SQL:

    Select a.id, a.date, b.val, a.tot, b.net, b.cre

    FROM table1 a

    join table2 b left

    "on a.id = b.id and a.date = b. and a.date ='02-Feb-2014."

    In the tables below contains no data for the month of February but still im getting the incorrect data. He must not returnany files right?

    Table1:

    IDDateValtot
    1January 1, 1319
    22 January 1338
    33 January 1347
    4January 4, 1356
    55 January 1365

    Table2:

    IDDateNETCRE
    1January 1, 1319
    213 January 1338
    33 January 1347
    4January 4, 1356
    55 January 1365

    "It should not returnany files right?

    Wrong, there is no where clause so it should return all the records in a padded with NULL values for b.

  • view inline values, which gives bad result...

    I saw a123 table with data below...


    GRANTAMOUNTDRCR
    112341000D
    212345000C
    3123452000C
    4123457000D



    Now I want below o/p of the table of the a123


    GRANTBALANCE
    1234-4000
    12345-5000

    To do this, I wrote below the query but its appropriate result not give...

    Select grant, credit-debit balance of)

    Select grant, sum (debit) Debit, sum (credit) credit of)

    Select grant,

    Drcr case when 'C' THEN amount *-1 Else NULL END in the form of credit.

    Drcr case when had ' then amount end otherwise null flow

    from a123)

    Grant group);

    top query results are below...

    GRANTBALANCE
    112346000
    2123459000

    Please help me on this thanks...

    Pretty obvious what is wrong:

    you convert credit figures in negative numbers with the case statement

    If you have

    1 1234 1000 D
    2 1234 -5000 C
    3 12345 -2000 C
    4 12345 7000 D

    and after that you are subtracting these figures of your throughput numbers.

    Therefore, do not convert negative credits before subtracting the or if you want to make negativ, then you must add them.

    1000 + 5000 =-4000

    1000-5000 = 6000

    HTH

  • Oracle text index does not return the expected results.

    Hello

    My project requires a generic search on 5 different columns and all the VARCHAR2 data type.
    As performance is very slow with AS % search, I try to use for the multi_column_datastore that is recommended for this.

    Here's what I did.

    1 - Create table.
    CREATE TABLE BILLING_SCHEMA.NAMES_TABLE ( 
        ID                  NUMBER(9,0) NOT NULL,
        ENTITY_NUMBER         VARCHAR2(30) NOT NULL,
        GIVEN_NAMES         VARCHAR2(50) NULL,
        SURNAME             VARCHAR2(30) NULL,
        ORGANISATION_NAME     VARCHAR2(60) NULL,
        DISPLAY_NAME        VARCHAR2(100) NULL 
        )
    /
    
     
    My search must be made on the columns ENTITY_NUMBER, GIVEN_NAMES, surname, ORGANISATION_NAME and DISPLAY_NAME.

    2. - insert values into the table
    INSERT INTO NAMES_TABLE VALUES(1, 'GH', NULL, NULL, NULL, 'GROUP OF HOSPITAL')
    /
    INSERT INTO NAMES_TABLE VALUES(2, 'DH', NULL, NULL, NULL, 'DEPARTMENT OF HEALTH')
    /
    INSERT INTO NAMES_TABLE VALUES(3, 'REC', NULL, NULL, NULL, 'DEBTOR FOR RECEIPTS')
    /
    INSERT INTO NAMES_TABLE VALUES(4, 'UN_REC', NULL, NULL, NULL, 'DEBTOR FOR UNMATCHED RECEIPTS')
    /
    INSERT INTO NAMES_TABLE VALUES(5, 'SAM_FUND', NULL, NULL, NULL, 'THE S FUND')
    /
    
     
    3 - create context multi_column_datastore index
    BEGIN
    CTX_DDL.CREATE_PREFERENCE('NAMES_TABLE_MULTI', 'MULTI_COLUMN_DATASTORE');
    CTX_DDL.SET_ATTRIBUTE('NAMES_TABLE_MULTI', 'COLUMNS', 'ENTITY_NUMBER, GIVEN_NAMES, SURNAME, ORGANISATION_NAME, DISPLAY_NAME');
    END;
    
    CREATE INDEX NAMES_TABLE_IDX
    ON NAMES_TABLE(ENTITY_NUMBER)
    INDEXTYPE IS   CTXSYS.CONTEXT
    PARAMETERS ('DATASTORE NAMES_TABLE_MULTI')
    
     
    4 - create the trigger that should update the column ENTITY_NUMBER if everything is inserted/updated
    CREATE OR REPLACE TRIGGER NAMES_TABLE_TRIGGER
    BEFORE INSERT OR UPDATE OF GIVEN_NAMES, SURNAME, ORGANISATION_NAME, DISPLAY_NAME  ON NAMES_TABLE
    FOR EACH ROW
    BEGIN
      :NEW.ENTITY_NUMBER := :NEW.ENTITY_NUMBER;
    END
     
    5. the search query
    SELECT *
    FROM NAMES_TABLE
    WHERE  CONTAINS(ENTITY_NUMBER,'%TH%') > 0
     
    I am so very confused here because the result returned is only
    ID     ENTITY_NUMBER     GIVEN_NAMES     SURNAME     ORGANISATION_NAME     DISPLAY_NAME         
     2      DH                  (null)        (null)         (null)          DEPARTMENT OF HEALTH 
     
    When I wait for him that the 5th inserted record is returned too as it contains "THE S FUND" that begins with "TH".

    When I use the search string '% %' and %, no results are returned, although I expect at least two records in each case.

    I would appreciate help with this.

    Thanks in advance,
    Marilyn

    Published by: user5615580 on 08/03/2011 21:35

    Published by: user5615580 on 08/04/2011 16:33
  • Find text in secure file gives bad result

    I'm usung Adobe Reader 10.1.4 with Windows 7 32 bit.  When I try to find the text, I get a wrong result if the PDF is secured.  I get the correct result in a file that is not guaranteed.  The same search for the secure file works on another PC also running Adobe Reader 10 and Windows 7.  I uninstalled Adobe Reader and re-installed.  Any ideas on what could cause this?

    After much research of all options of security in programs I thought likely to affect Adobe Reader, I reached nothing a lot of expletives later, I found the solution

    Open Adobe Reader > edit > Preferences > search, click on "empty Cache Contents.

    Everything works again!

  • Query to find columns (in relation FK) which gives bad child result...

    I need to find all the columns in a Parent child table. I wrote the below query to do this.

    CREATE TABLE test_parent
    (      supplier_id      number(10)      not null,
         supplier_name      varchar2(50)      not null,
         contact_name      varchar2(50),      
         CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)
    );
    
    
    
    
    CREATE TABLE test_child
    (      product_id      number(10)      not null,
         child_supplier_id      number(10)      not null, ---*its child_supplier_id not supplier_id*
         CONSTRAINT fk_supplier
           FOREIGN KEY (child_supplier_id)
          REFERENCES test_parent(supplier_id)
          ON DELETE CASCADE
    );
    
    
    insert into test_parent values (3,'ABC','John');
    insert into test_child values (993983,3);
    
    
    COL TABLE_NAME FORMAT A25
    COL CONSTRAINT_TYPE FORMAT A25
    COL CHILD_COLUMN FORMAT A25
    
    select     a.table_name, 
         b.column_name child_column
    from user_constraints a,
         user_cons_columns b
         where a.r_constraint_name=b.constraint_name
    and R_CONSTRAINT_NAME =  (select constraint_name from 
                     user_constraints where table_name = 'TEST_PARENT' -- I enter the parent table name here
                    and constraint_type = 'P'
                   )
    and constraint_type = 'R';
    
    
    TABLE_NAME                CHILD_COLUMN
    ------------------------- ------------------------
    TEST_CHILD                SUPPLIER_ID
    It should be
    *child_supplier_id*
    Let's not my request. I'm doing something really stupid here.

    Try this one

    select fk_cons.table_name, fk_cons.constraint_name, fk_cols.column_name
    from user_constraints PK_cons
    join user_constraints fk_cons on fk_cons.r_constraint_name = pk_cons.constraint_name
    join user_cons_columns fk_cols on fk_cols.constraint_name = fk_cons.constraint_name
    where fk_cons.constraint_type = 'R'
    and PK_cons.table_name = 'TEST_PARENT';
    
  • (9.2.0.5.0) 9i - Oracle Text - Indexing of Oracle files on the FTP server

    I'm using Oracle 9i (9.2.0.5.0) and I cannot upgrade to a newer version of Oracle DB.
    I am new to this technology, and I have not tried it yet myself.

    I was reading some articles, documents or references on Oracle text technology and I find that Oracle text must be able to create an index of context on files residing on the FTP server.
    I also discovered that, for this purpose, a 'URL_DATASTORE' should be used.

    I'd be happy if someone can answer my question before I decide to start using this technology:
    Is there a limitation that I should be informed when creating index of context on files residing on the FTP server? (file size limit, limitation of the types of files supported)
    -In the creation of the index process are the files indexed, downloaded and copied in the Oracle database permanently or only temporarily until the index is created?
    -Everything is of incremental indexing (when I add new files in the data store that I don't have to rebuild the entire index)?
    There there a formula between context index disk size and the disk size indexed files?

    Kind regards

    Michal

    Is there a limitation that I should be informed when creating index of context on files residing on the FTP server? (file size limit, limitation of the types of files supported)
    Maximum file size is configurable up to 2 GB. No limitation on the file type from the data store itself, but if you want to process binary file list filter suported file formats will apply (see the appendix in the Administrator's guide)

    -In the creation of the index process are the files indexed, downloaded and copied in the Oracle database permanently or only temporarily until the index is created?
    That temporarily

    -Everything is of incremental indexing (when I add new files in the data store that I don't have to rebuild the entire index)?
    The question, I suspect that you see this as a robot - you expect to provide the address of an FTP site and have it look for all documents. This isn't how it works. Instead, you must place all of the URLS in a table, and text will index these URLS (and only these URLs)

    If new files are added, you must reorganize somehow having the new lines added to your table. Then the text will do an incremental update, it will not have to rebuild the entire index.

    There there a formula between context index disk size and the disk size indexed files?
    It varies a lot depending on the data types and indexing of selected options, but a typical result is that the index will be 40% of the total size of the file. However, if the documents are in the format (for example, Word, PDF) the percentage will be much smaller.

  • Copy and paste the code which gives different results

    I use PS CS5 and need to copy and paste the code from one page to another. The reason is that the only difference is a change in the images and titles.

    When I view the page copied in a browser the table continues beyond the wrapper div and none of the images are visible.

    Here is the copied code:

    <! DOCTYPE HTML > < html lang = "en" >

    < html >

    Head of <>< name meta = "robots" content = "INDEX, FOLLOW" / >

    < name meta = "robots" content = "noimageindex" / >

    < name meta = "description" content = "Ace with checkered flag logo" / >

    < name meta = "keywords" content = "Top Trumps, Ace, flag at checkerboard, Classic Cars, drag racing, heavy trucks, 500 miles of Indianapolis, International bus, luxury cars, luxury cars Made in Germany, Yachts of luxury, the NASA Super Jets, cars, Rolls-Royce, Street Bikes, street cruisers, Super-Bikes, Super Sonics, Super Trains in the world." / >

    < title > < /title > checkered flag

    < link href = "css/table.css" rel = "stylesheet" type = "text/css" media = "screen" > "

    < / head >

    < div id = 'wrapper' >

    < body >

    < div id = "bread crumbs" >

    < a title = "Return to Homepage" href = "index.html" > home < /a > & bull; < a title = "Go back to index of England" href = "england.html" > English Top Trumps < /a > & bull; "< a title ="Back to Ace Index"href ="... /... ' / index.html - ace "> Ace Index < /a >

    < / div >

    < div id = "banner logo" >

    "< img src ="... /... / images/title.jpg ">"

    < / div >

    < div id = "page title" > < flag checkerboard of h1 > < / h1 > < / div >

    < div id = "table" align = "center" >

    < table >

    < thead >

    < b >

    < th = "column" range > Classic Cars < /th >

    < th = "column" scope > < /th > Dragster

    < th = "column" scope > < /th > trucks

    < th = "column" scope > Indianapolis 500 < /th >

    < th = "column" scope > International bus < /th >

    < /tr >

    < / thead >

    < tbody >

    < b >

    < td > < img title = "cars classic Ace assets with the checkered flag" src = "images/futbol_yildizlari.gif" > < table >

    < td > < img title = "Dragster Ace assets with the checkered flag" src = "images/HP-ve - zumruduanka.gif" > < table >

    < td > < img title = "Trucks heavy Ace assets with the checkered flag" src = "images/hp_ve_ateskadehi.gif" > < table >

    < td > < img title = "Indianaplis 500 Ace assets with the checkered flag" src = "images/karayip_korsanlari.gif" > < table >

    "< td > < img title ="Bus International Ace assets with the checkered flag"src ="... /... / images/international_buses_ace.gif ' > < table >.

    < /tr >

    < b >

    < td > click on the < table > image

    < td > click on the < table > image

    < td > click on the < table > image

    < td > click on the < table > image

    < td > click on the < table > image

    < /tr >

    < / tbody >

    < thead >

    < b >

    < th = "column" scope > luxury car < /th >

    < th = "column" scope > luxury cars Made in Germany < /th >

    < th = "column" scope > < /th > Luxury Yachts

    < th = "column" scope > the NASA Super Jets < /th >

    < th = "column" scope > race cars < /th >

    < /tr >

    < / thead >

    < tbody >

    < b >

    "< td > < img title ="Luxury cars Ace assets with the checkered flag"src ="... /... /images/luxury-cars-ACE.gif' > < table >

    "< td > < img title ="Cars luxury Made in Germany Ace assets with the checkered flag"src ="... /... / images/Lux_Cars_Made.gif ' > < table >.

    "< td > < img title ="Luxury Yachts"src ="... /... / images/Luxury_Yachts.gif ' > < table >.

    "< td > < img title ="NASA Super Jets Ace with checkered flag"src ="... /... /images/NASA_Super-Jets_Ace.gif' > < table >

    "< td > < img title = 'Race Cars Ace with checkered flag' src = '... /... / images/Race_Cars.gif ' > < table >.

    < /tr >

    < b >

    < td > click on the < table > image

    < td > click on the < table > image

    < td > click on the < table > image

    < td > click on the < table > image

    < td > click on the < table > image

    < /tr >

    < / tbody >

    < /table >

    < / div >

    < div id = 'foot' >

    & copy; 2005-2016 Ultimate Top Trumps. All rights reserved < / div >

    < / body >

    < / html >

    Thanks in advance.

    At first glance, I see that you have a wrapper

    before the openingtag. You can't do that.

    Run the validator at http://validator.w3.org/nu for a list of your html of your page errors. Clean and your page should work fine.

  • SDO_FILTER which gives weird results

    Hi people,

    Not sure if this is a bug or maybe I'm just not see something simple. On 11.2.0.4. I have an area of the area of interest and a line next door representing a piece of water, the two geometries validate the tolerance of 5 centimeters.
    http://www.dziemiela.com/june27.PNG
    The box is more than a mile away from the stream. The flow is relatively small and its MBR is no where close to touch the area. However, according to SDO_FILTER, two geometries are TRUE. I'm puzzled. So I wrote the mess for anyone wishing to give it a shot. I'll be back

    Streamy is valid? TRUE
    Véronique is valid? TRUE
    Basic SDO_GEOM. RELATE? DISJOINT
    Distance between 1795.19857225394 M
    MIL SDO_GEOM. RELATE? DISJOINT
    Distance between 1794.97512096382 M
    SDO_RELATE County 0
    SDO_FILTER County 1

    If two geometries are distance of 1.7 km and their members are distance of 1.7 km. I would like to say very clearly that these things shouldn't interact. Right? However, filter gives TRUE. Am I a something Klutz?

    Thank you
    Paul
    DECLARE
       sdo_streamy SDO_GEOMETRY := SDO_GEOMETRY(2002,8265,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY(-77.6495001234516,38.9423350727726,-77.6482987901201,38.9418092727734,-77.6468049234557,38.9413522727742,-77.6461311901235,38.9413982061074,-77.6438177901271,38.942107872773,-77.6427925901286,38.9423368727726,-77.6423533234627,38.9422912727727,-77.6410643234647,38.9417884061068,-77.6406835234653,38.9416968727736,-77.6403321234658,38.9417886061068,-77.6394825901338,38.9417886727735,-77.63760792347,38.9414232061074,-77.6370221234709,38.9410114727747,-77.6357033901397,38.9392504727774,-77.6352933234736,38.9389760727778,-77.6347071901412,38.9380154727793,-77.6313675901464,38.9348822727842,-77.6301375234816,38.9342876061185,-77.6295517234825,38.9336930061194,-77.6294929901493,38.9335098727863));
       sdo_boxy SDO_GEOMETRY := SDO_GEOMETRY(2003,8265,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(-77.6087382736728,38.9295533233688,-77.4229814409148,38.9295533233688,-77.4229814409148,39.0744969598833,-77.6087382736728,39.0744969598833,-77.6087382736728,38.9295533233688));
       num_result NUMBER;
    BEGIN
       dbms_output.put_line('Streamy is valid? ' || SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(sdo_streamy,0.05));
       dbms_output.put_line('Boxy is valid? ' || SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(sdo_boxy,0.05));
       dbms_output.put_line('Basic SDO_GEOM.RELATE? ' || SDO_GEOM.RELATE(sdo_streamy,'DETERMINE',sdo_boxy,0.05));
       dbms_output.put_line('Distance Between ' || SDO_GEOM.SDO_DISTANCE(sdo_streamy,sdo_boxy,0.05) || 'M');
       dbms_output.put_line('MBRs SDO_GEOM.RELATE? ' || SDO_GEOM.RELATE(SDO_GEOM.SDO_MBR(sdo_streamy),'DETERMINE',SDO_GEOM.SDO_MBR(sdo_boxy),0.05));
       dbms_output.put_line('Distance Between ' || SDO_GEOM.SDO_DISTANCE(SDO_GEOM.SDO_MBR(sdo_streamy),SDO_GEOM.SDO_MBR(sdo_boxy),0.05) || 'M');
       EXECUTE IMMEDIATE 'CREATE TABLE streamy (shape SDO_GEOMETRY)';
       EXECUTE IMMEDIATE 'INSERT INTO streamy (shape) VALUES (:p01)' USING sdo_streamy; COMMIT;
       INSERT INTO user_sdo_geom_metadata(table_name,column_name,diminfo,srid) VALUES 
       ('STREAMY','SHAPE',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',-180,180,.05),MDSYS.SDO_DIM_ELEMENT('Y',-90,90,.05)),8265); COMMIT;
       EXECUTE IMMEDIATE 'CREATE INDEX streamy_spx ON streamy(shape) INDEXTYPE IS MDSYS.SPATIAL_INDEX';
       EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM streamy a WHERE SDO_RELATE(a.shape,:p01,''MASK=ANYINTERACT'')=''TRUE''' INTO num_result USING sdo_boxy;
       dbms_output.put_line('SDO_RELATE Count ' || TO_CHAR(num_result));
       EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM streamy a WHERE SDO_FILTER(a.shape,:p01)=''TRUE''' INTO num_result USING sdo_boxy;
       dbms_output.put_line('SDO_FILTER Count ' || TO_CHAR(num_result));
    END;
    /

    Hi Paul,.

    For geodetic geometry, R-tree index are in 3D. For example, you can see:

    SQL> select sdo_index_name, SDO_ROOT_MBR from user_sdo_index_metadata;
    
    SDO_INDEX_NAME
    --------------------------------
    SDO_ROOT_MBR(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINAT
    --------------------------------------------------------------------------------
    STREAMY_SPX
    SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1007, 3), SDO_ORDINATE_ARR
    AY(.16636, -.759816, .628418, .166646, -.759754, .628538))
    

    sdo_boxy is converted to:
    SDO_GEOMETRY (3008, NULL, NULL, SDO_ELEM_INFO_ARRAY (1, 1007, 3), SDO_ORDINATE_ARR)
    AY (. 166589,-. 759798,.628364,.169393,-. 757698,.630331))

    If the two MBR or minimum limit boxes (MBBs) intersect.

    Thank you
    Ying

  • Order by date which gives undesired results

    Hi guys

    We use a table: a_action_data
    in a field that is: date type action_date

    We are inserting two records in this table at the same time then the two documents have the same value for the date of the action as the 15/02/2012 08:02:59

    first of all, we insert APPROVED
    Then we insert READY

    Select a.rownum, a.action_date, a.action in a_action_data

    Rownum Action_date Action
    -------- ------------------------------ --------------
    1 2/15 / 2012 CREATED 08:32:06
    2 2/15 / 2012 08:33:59 APPROVED
    3 2/15/2012 READY AT 08:33:59

    Select a.rownum, a.action_date, a.action in a_action_data order of action_date
    Rownum Action_date Action
    -------- ------------------------------ --------------

    1 2/15 / 2012 CREATED 08:32:06
    3 2/15/2012 READY AT 08:33:59
    2 2/15 / 2012 08:33:59 APPROVED

    Can you explain why LOAN comes before APPROVED .well, it was inserted after APPROVED.
    and there is no difference between the date of the action of these two

    Thank you

    Hello

    873159 wrote:
    ... I understand your answer, but then, what are the criteria used internally in this case (since both records have the same date)) to sort the records

    What is the order when you do not have an ORDER BY clause at all? Oracle output lines in whatever order it finds convenient, depending on how the lines are read, what treatment is done for lines and other factors. There is no guarantee that the lines will be in a particular order. If you run the same exact query again, without any change to the table, you can get a different order.

    It goes the same for lines where there is equality in ORDER BY expressions. If the entire ORDER BY clause is "ORDER BY action_date", then you can be certain that the lines with a lower action_date will come before lines with a higher action_date, but, if 2 or more rows have exactly the same action_date, to the second, so they could appear together in an order any. If you rerun the query, without chaniging table, the related rows may appear together in a different order.

    If you want the output in a particular order, to use an ORDER BY clause to mean that order.

  • Key combinations give bad result?

    Hello

    I recently bought the HP Pavilion 15-e007tu from an ecomerce store. I just found out that when I press on "shift + 2" for typing ' @' he doesn't but double quotation ("") is a combination. "." In the same way when I press the combination 'shift + single quote', it seems "@" instead of double quotes.

    The keys work incorrectly, interchangeably, except these two the rest work correctly.

    How can I solve this problem? Is this a glitch or a large?

    Thanks for all your help!

    Yes, but the same thing applies to a laptop computer with Windows installed.

    Keyboards are mapped in languages and they may differ by a few keystrokes. A selection of English UK differs from English in the United States or International.

  • Count on column month function gives bad result

    Hello

    I'm on OBIEE 11.1.1.7.150120.

    I used the count on the column for the month function and instead of getting 12 as the answer I get 365. (I used a filter on the column year to restrict to one year)

    How could it happen?

    Any help would be appreciated.

    A count on your back 1661600 fact table is not strange because it is normal to have a ton of lines (zero, one or more for each value of your dimensions).

    If you look at the physical SQL what is it? 365 days is because of 1 line of time Sun has multiple matches on your fact table or is dim because your time is at the level of the day (again 365 is really a strange number: exactly the number of days in the year...).

    But the distinct count is your solution, because as soon as your will a request using your time and dimension of any other table with County you will count the number of lines and not the number of months.

  • Satellite L10 and keyboard:-shift key gives wrong results

    Using the SHIFT key with most of other than a-z keys gives bad result.
    I tried to re - install a driver via Control Panel / keyboard with the Toshiba XP Home CD inserted but not better driver is found.
    Control Panel / regional and language setting is English UK

    Hello, Alan

    It will be nice if you can give us more information. What specific keyboard of the country you have? What you want to do exactly? Give us a few examples please.

  • bad results for the search for context on the empty element tags

    I use Oracle DBMS 11.1 and 11.2 and created an index on an XML column context (article group: PATH_SECTION_GROUP).
    When you enter a query like

    SELECT count (*) FROM my_table t WHERE contains (t.co_xml,'hasPath(/tag1/tag2)') > 0

    I get bad results if tag2 is an empty element tag (< tag2 / >) that appears somewhere in the
    XML instance, but is NOT directly under tag1.

    For example, the following XML instance is (but shouldn't!):

    < a >
    blah blah < tag3 > < tag1 > < / tag3 > < / tag1 >
    blah < tag4 > < tag2 / > < / tag4 >
    < /a >

    This seems to happen only for the empty element tags. Is this a known bug and does anyone know of a workaround?

    Thank you in advance for your help!
    Roman

    Like you, I've been looking in the wrong places, bug of thought, rather than documented behavior. Finally, I came across the following excerpt from the next section of the documentation on haspath in Oracle text reference.

    http://download.Oracle.com/docs/CD/B28359_01/text.111/b28304/cqoper.htm#i997393

    Limits

    Because of the way in which XML data section are saved, false match may appear with XML sections that are completely empty as follows:

    
    

    A query of HASPATH(A/B/E) or HASPATH(A/D/C) falsely corresponds to this document. This type of fake correspondent can be avoided by inserting some text between the empty tags.

  • Oracle text index - unexpected behavior

    We have a SEARCH_TABLE (in Oracle 12.1.0.1.0) with a couple of files (actually about 10,000,000 records):

    ID ADDRESS

    1     | WIMPEL | 57. 9733BK | GRONINGEN |

    2     | JOHAN WILSSTRAAT | 7 ||| 1333PV | ALMERE |

    3     | ABRAHAM KUYPERHOF | 10. 8091XN | WEZEP |


    To support research on the table addresses, we apply an Oracle text index:

    create index ST_CTX1 on SEARCH_TABLE (address)

    indexType is ctxsys.context

    parameters ("DATASTORE CTXSYS. DEFAULT_DATASTORE');


    Our research focuses on whole words (without jokers). When searching through the data, it usually comes back with the correct results.


    SELECT THE ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, 'GRÖNING') > 0

    ;

    Returns nothing, that is correct. Once the search argument 'GRÖNING' is replaced by 'GRONINGEN', ID 1 is correctly selected. According to this behavior, the following query returns no records:

    SELECT THE ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, 'ABR & KUYPERHOF') > 0

    ;


    Surprisingly, however, the following query returns record ID 3:

    SELECT THE ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, ' A & KUYPERHOF ') > 0

    ;

    (Even if data does not contain the complete word 'A'). This unexpected behavior only seems to occur when you use "A" as the initial character.

    The following query (with the search starting with the character 'J' argument) returns no data. Which is the expected behavior.

    SELECT the ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, 'J & WILSSTRAAT') > 0

    ;

    Anyone has an idea why the text index returns with A situations? Any ideas on how to solve this problem are appreciated.

    Mark

    According to the list of empty words by default in 11.2, the letters a, d, i, s, and t are listed, so would be removed from the wanted list of tokens.  Thus, 'A & WILSSTRAAT' becomes '& WILSTRAAT' and search text line with a single word.  'j' is not an empty word, so it is considered to be a token is valid and is not in your tables.  Look in CTXSYS. CTX_STOPWORDS to see what you have.

Maybe you are looking for

  • Cannot create the 2nd partition

    OS x 10.8.5 attempted to create a 2nd partition for El Capitan Started in recovery partition open disk utility Click on the (+) sign to create a new partition partitioning began says the disk that shrink crashed - had to force reboot Started in singl

  • Profile pictures

    My profile for contact photos does not show all I have is their username. Can someone help me to be able to take pictures to show too: happy:... Thank you

  • Need driver for PC or TP04GMV561 - Tecra 8000 advanced card

    I just rebuilt a Tecra 8000 with Win98SE and now need the drivers for the Advanced PC TP04GMV561 card which I can't find on the web. Thank you Chris

  • Update of Marshmallow and News Page

    I remember how the people had panic and the same questions several times about the Android Lollipop update in the forum bike G 1st Gen. Is not this will be a great idea if one of the Motorola volunteer / mentor creates a page of official news from Ma

  • HP Office jet 6700 all-in-one printer

    My old HP 6500 printer would save the scans as word documents.  My new printer 6700 by default to save images in PDF.  How I can format documents?