duplicate records

Hello
My computer seems to duplicate files from one place to the other, when I open a specific folder, I always have a double, as a record "under". When I click on the folder "sub", my wallpaper changes abruptly and the standard background (winchap background) is displayed.
Please advised.

Hi bruno1976t,

Thanks for posting in Microsoft Communities. It may be a virus on the computer. Provide the following information:

·         Did you do changes on the computer before the show?

Perform a scan using verification and the Microsoft safety scanner.

http://www.Microsoft.com/security/scanner/en-us/default.aspx

Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

Let us know if you need more assistance. We will be happy to help you.

Thank you.

Tags: Windows

Similar Questions

  • Matching records between 2 tables with duplicate records

    Hi all

    I need help in what follows.

    I have 2 tables Received_bills and Send_bills.

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

    -The DOF for Table SEND_BILLS

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

    CREATE TABLE SEND_BILLS

    (DATE OF "DATUM",

    NUMBER OF "PAYMENT."

    'CODE' VARCHAR2 (5 BYTE)

    )  ;

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

    -The DOF for Table RECEIVED_BILLS

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

    CREATE TABLE 'RECEIVED_BILLS '.

    (DATE OF "DATUM",

    NUMBER OF "PAYMENT."

    'CODE' VARCHAR2 (5 BYTE),

    VARCHAR2 (5 BYTE) 'STATUS' )  ;

    INSERTION of REM in RECEIVED_BILLS

    TOGETHER TO DEFINE

    Insert. RECEIVED_BILLS (DATUM, PAYMENT, CODE, STATE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1', 'SUCCESS');

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 'A5', 'SUCCESS', 25);

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 47, 'A4', 'FAILED');

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1', 'FAILED');

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1', 'SUCCESS');

    INSERTION of REM in SEND_BILLS

    TOGETHER TO DEFINE

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 47, 'A4');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('09-OCT-15','DD-MON-RR'), 19, 'A8');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 20, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5');

    I match all records of send_bills and received_bills with a status of 'SUCCESS' There is no single column in the table.

    Correspondence held payment of columns, the code and the scratch cards, but it may also duplicate records. But even if there are duplicates, I also need those records in the query results

    the query I wrote is this:

    SELECT SEND.*

    REC received_bills, send_bills send

    WHERE send.datum = rec.datum

    AND send.payment = rec.payment

    AND send.code = rec.code

    AND 'rec.status =' SUCCESS

    ;

    The query results give me this

    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1525A5
    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1525A5

    The result of the correct application would be

    OCTOBER 10, 1519A1
    OCTOBER 10, 1525A5
    OCTOBER 10, 1519A1

    The select statement that I need I want to use a loop to insert records in another table.

    Can someone help me please?

    Thanks in advance.

    Best regards

    Caroline

    Hi, Caroline.

    Caroline wrote:

    Hi all

    I need help in what follows.

    I have 2 tables Received_bills and Send_bills.

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

    -The DOF for Table SEND_BILLS

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

    CREATE TABLE SEND_BILLS

    (DATE OF "DATUM",

    NUMBER OF "PAYMENT."

    'CODE' VARCHAR2 (5 BYTE)

    )  ;

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

    -The DOF for Table RECEIVED_BILLS

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

    CREATE TABLE 'RECEIVED_BILLS '.

    (DATE OF "DATUM",

    NUMBER OF "PAYMENT."

    'CODE' VARCHAR2 (5 BYTE),

    VARCHAR2 (5 BYTE) 'STATUS');

    INSERTION of REM in RECEIVED_BILLS

    TOGETHER TO DEFINE

    Insert. RECEIVED_BILLS (DATUM, PAYMENT, CODE, STATE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1', 'SUCCESS');

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 'A5', 'SUCCESS', 25);

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 47, 'A4', 'FAILED');

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1', 'FAILED');

    Insert into RECEIVED_BILLS (PAYMENT, CODE, DATE, STATUS) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1', 'SUCCESS');

    INSERTION of REM in SEND_BILLS

    TOGETHER TO DEFINE

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 47, 'A4');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('09-OCT-15','DD-MON-RR'), 19, 'A8');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 20, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5');

    I match all records of send_bills and received_bills with a status of 'SUCCESS' There is no single column in the table.

    Correspondence held payment of columns, the code and the scratch cards, but it may also duplicate records. But even if there are duplicates, I also need those records in the query results

    the query I wrote is this:

    SELECT SEND.*

    REC received_bills, send_bills send

    WHERE send.datum = rec.datum

    AND send.payment = rec.payment

    AND send.code = rec.code

    AND 'rec.status =' SUCCESS

    ;

    The query results give me this

    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 25 A5
    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 25 A5

    The result of the correct application would be

    OCTOBER 10, 15 19 A1
    OCTOBER 10, 15 25 A5
    OCTOBER 10, 15 19 A1

    The select statement that I need I want to use a loop to insert records in another table.

    Can someone help me please?

    Thanks in advance.

    Best regards

    Caroline

    Want to get answers that work?  Then make sure that the CREATE TABLE and INSERT statements you post too much work.  Test (and, if necessary, correct) your statements before committing.  You have a stray "." in the first INSERT statement for received_bills and receikved_bills.status is defined as VARCHAR2 (5), but all values are 6 characters long.

    There are 5 lines in send_bills that are similar to the

    10 OCTOBER 2015 19 A1

    Why do you want that 2 rows like this in the output, not 1 or 3, or 4 or 5?  Is it because there are 2 matching rows in received_bills?  If so, you can do something like this:

    WITH rec AS

    (

    SELECT the reference, payment, code

    , ROW_NUMBER () OVER (PARTITION BY datum, payment, code)

    ORDER BY NULL

    ) AS r_num

    OF received_bills

    Situation WHERE = 'SUCCESS'

    )

    send AS

    (

    SELECT the reference, payment, code

    , ROW_NUMBER () OVER (PARTITION BY datum, payment, code)

    ORDER BY NULL

    ) AS r_num

    OF send_bills

    )

    SELECT send.datum, send.payment, send.code

    REC, send

    WHERE send.datum = rec.datum

    AND send.payment = rec.payment

    AND send.code = rec.code

    AND send.r_num = rec.r_num

    ;

    Note that the main request is very similar to the query you posted, but the last condition has changed.

    If you need to insert these lines in another table, you can use this query in an INSERT statement. There is no need of a loop, or for any PL/SQL.

  • APEX 5.0 Export to CSV produces duplicate records

    Good day to you all:

    I use APEX 5.0, and I have a classic report that has a total number of lines of 274.  (274 documents also in SQL Developer).  However, when I export the report to CSV, duplicate records are produced and the total number of lines increases to 365.  Has anyone already known this before bug in APEX 5.0?  I tried to reproduce the report to a type of interactive, but I get the same results when you export to CSV.  Advice or guidance would be appreciated.  Thank you.

    Aqua

    Hey Aqua,

    If you are APEX 5.0.0 or 5.0.1? And which version of the database, you are on?

    There was a problem with CLOB (which are used for the download) in 5.0.0 running on specific versions of 11 GR 2. A fix is included in the 5.0.1 patch set.

    Concerning

    Patrick

  • Marking duplicate records

    Hi gurus of the Oracle,.

    Good morning/afternoon/evening!

    There are several methods to effectively identify duplicate records. e.g. row_number() and group by, but all of these methods to highlight the duplicate record only. Which means that if your table has data such as

    IDNameRoomDate
    1ABC20320/07/2015
    2FGH10920/09/2015
    3HSF20220/08/2015
    4REF20120/08/2015
    5FGH10920/09/2015
    6HSF29124/08/2015

    And I want to find duplicates based on name/room/day

    Most of the queries will give me

    Or the other

    IDNameRoomDate
    5FGH10920/09/2015

    or

    IDNameRoomDate
    2FGH109

    20/09/2015

    They don't give me two files unless I first do a group by (or Row_Number) in an internal query and then try to get the two lines in the outer query. In my view, should not be the way.

    I need a report which highlights the two records only

    IDNameRoomDate
    2FGH10920/09/2015
    5FGH10920/09/2015

    Hope that is clear.

    Thanks in advance!

    Hello

    34MCA2K2 wrote:

    Hi gurus of the Oracle,.

    Good morning/afternoon/evening!

    There are several methods to effectively identify duplicate records. e.g. row_number() and however all these methods to highlight only the duplicate of group by. Which means that if your table has data such as

    ID Name Room Date
    1 ABC 203 20/07/2015
    2 FGH 109 20/09/2015
    3 HSF 202 20/08/2015
    4 REF 201 20/08/2015
    5 FGH 109 20/09/2015
    6 HSF 291 24/08/2015

    And I want to find duplicates based on name/room/day

    Most of the queries will give me

    Or the other

    ID Name Room Date
    5 FGH 109 20/09/2015

    or

    ID Name Room Date
    2 FGH 109

    20/09/2015

    They don't give me two files unless I first do a group by (or Row_Number) in an internal query and then try to get the two lines in the outer query. In my view, that shouldn't be the way...

    Help the ROW_NUMBER analytic function, that you described is probably the easiest and most effective way to get the desired results.

    You can do it without using any kind of subquery (for example, with a self-join or CONNECT BY), but which requires SELECT DISTINCT, which is inefficient.

  • Load ASO duplicate records

    Hello

    I'm loading data in the ASO cube directly from the text file (without using a buffer) and numbers of duplicate records are added, but I need the numbers since the last duplicate record to overwrite all previous records. Is it possible to implement in Essbase ASO?

    You can use the id of the buffer. The 'aggregate_use_last' property can be set to a buffer during initialization it.

    I do not belive there is an option to load the file directly using the command "Import database...". "in this situation.

    Kind regards

    Sunil

  • Check duplicate record all by preventing insertion

    Hello

    I have a scenario where I need to insert records from 20 000 to 30 000 daily in a table that has data in millions.

    Keep inserting a record in duplicate and in the event of any duplicate record, this issue need to be logged in another table.

    I used FORALL except SAVE to allow loading of all records not not duplicate. But with this approach, I am unable to know which record was duplicate or problems in the insertion.

    Also I can't use triggers to connect each record before insertion because I only need the duplicate records. Also, trigger will slow down performance.

    Guide kindly on what approach I should follow to do this (which are also good performance as data are huge).

    Kind regards

    Karki

    Logging error clause does not support dyrect path operations, you must remove the Add indicator to use.

    This is because the logging of errors using autonomous transaction.

    create table test_tomkt_raw
    (c1 varchar2(20),
    c2  varchar2(20),
    c3  varchar2(20));
    
    Table created
    
    Executed in 0,015 seconds
    create table test_mkt
    (c1 varchar2(20),
    c2  varchar2(20),
    c3  varchar2(20));
    
    Table created
    
    Executed in 0,031 seconds
    create table test_mkt_log
    (c1 varchar2(20),
    c2  varchar2(20),
    c3  varchar2(20));
    
    Table created
    
    Executed in 0,078 seconds
    insert into test_tomkt_raw VALUES( 'A','B','C');
    
    1 row inserted
    
    Executed in 0,015 seconds
    insert into test_tomkt_raw VALUES( 'A','B','C');
    
    1 row inserted
    
    Executed in 0 seconds
    insert into test_tomkt_raw VALUES( 'D','E','F');
    
    1 row inserted
    
    Executed in 0 seconds
    insert into test_tomkt_raw VALUES( 'R','BD','AC');
    
    1 row inserted
    
    Executed in 0 seconds
    insert into test_tomkt_raw VALUES( 'AQ','SB','AC');
    
    1 row inserted
    
    Executed in 0,016 seconds
    insert into test_tomkt_raw VALUES( 'AA','BA','CA');
    
    1 row inserted
    
    Executed in 0 seconds
    insert into test_tomkt_raw VALUES( 'A','B','C');
    
    1 row inserted
    
    Executed in 0 seconds
    insert into test_tomkt_raw VALUES( 'D','E','F');
    
    1 row inserted
    
    Executed in 0,016 seconds
    ALTER TABLE test_mkt
    ADD PRIMARY KEY (C1,C2,C3);
    
    Table altered
    
    Executed in 0,015 seconds
    BEGIN
      DBMS_ERRLOG.CREATE_ERROR_LOG('test_mkt');
    END;
    /
    
    PL/SQL procedure successfully completed
    
    Executed in 0,031 seconds
    INSERT /* APPEND */
    INTO TEST_MKT
    SELECT * FROM  TEST_TOMKT_RAW
    LOG ERRORS INTO ERR$_TEST_MKT ('TEST_01') --> This can be a variable on your code to identify this operation
    REJECT LIMIT UNLIMITED
    ;
    
    5 rows inserted
    
    Executed in 0,063 seconds
    INSERT INTO test_mkt_log
    SELECT er.c1, er.c2, er.c3
    FROM  ERR$_TEST_MKT er
    WHERE  er.ora_err_tag$ = 'TEST_01'--> This can be a variable on your code
    AND    er.ora_err_number$ = 1 --> Unique constraint violated
    ;
    
    3 rows inserted
    
    Executed in 0 seconds
    SELECT *
    FROM  TEST_MKT
    ;
    
    C1                  C2                  C3
    -------------------- -------------------- --------------------
    A                    B                    C
    AA                  BA                  CA
    AQ                  SB                  AC
    D                    E                    F
    R                    BD                  AC
    
    Executed in 0,062 seconds
    SELECT *
    FROM  TEST_MKT_LOG
    ;
    
    C1                  C2                  C3
    -------------------- -------------------- --------------------
    A                    B                    C
    A                    B                    C
    D                    E                    F
    
    Executed in 0,047 seconds
    DROP TABLE  test_tomkt_raw;
    
    Table dropped
    
    Executed in 0,032 seconds
    DROP TABLE  test_mkt;
    
    Table dropped
    
    Executed in 0,094 seconds
    DROP TABLE  err$_test_mkt;
    
    Table dropped
    
    Executed in 0,078 seconds
    DROP TABLE  test_mkt_log;
    
    Table dropped
    
    Executed in 0,047 seconds
    
  • Problem joining tables; duplicate records

    I have problems with my request. She joined essentially three tables. I am inside the environment of the Apex, but this problem is with my request. I have three tables:

    JOBS

    Job_Id PK

    Job_Number

    Goal

    Title

    JOB_BUNDLES

    Job_Bundle_Id PK

    Modification_Number

    Justification

    Job_Id FK

    JOB_TASKS

    Job_Task_Id

    Sequence

    Task_Id (values can be either 1,2,3,4,5 or 6)

    Job_Bundle_Id FK

    You can see the stream / connection between each table. A JOB can have several JOB_BUNDLES and one can JOB_BUNDLE have JOB_TASKS a lot. One-to-many relationships

    My query now displays a report of JOB_BUNDLES for a given job, represented in the form:

    SELECT
    Job_Bundle_Id, Modification_Number, Justification, Job_Id
    FROM JOB_BUNDLES JB
    WHERE JB.Job_Id = :P26_Job_Id
    

    The page element, P26_Job_Id represents the Job_Id of the WORK of the table argument. That said, each record JOB_BUNDLE will have JOB_TASKS related records; more specifically, there will be at least a record where JOB. TASKS. Task_Id = 6. This happens only once. I can't get my information from the request that I submitted and the information from the table JOB_TASKS where the Task_Id = 6. I tried to add a JOIN and a WHERE clause, but I still get duplicate records. If anyone has some insight on this issue, it would be greatly appreciated. Thanks in advance.

    What:

    SQL > select b.*

    2, (select t.sequence

    job_tasks 3 t

    4 where t.job_bundle_id = b.job_bundle_id

    5 and t.task_id = 6

    (6) seq

    job_bundles 7 b

    8 where b.job_id = 1;

    JOB_BUNDLE_ID MODIFICATION_NUMBER JUSTIFICATION JOB_ID SEQ

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

    1 0 there is no justification 1 12

    2 that 1 I'm just here for test 1

    3 2 it's the third amendment 1 7

    3 selected lines.

  • Miss an Interface if duplicate records present

    Hi all

    I'm using ODI 11 g.

    I have the flat file interface table where I use IKM as control SQL added, check validation Option, Insert, separate and truncate option as TRUE, control flows as FALSE.

    In my case, suppose I have 10 records out of these 2 records are duplicated. So my interface treats 8 discs to the next level.
    But I want to the failure of the interface if there is duplicate records.

    How to do this?

    Thank you
    Lony

    A set the primary key in the database or ODI?

    Do it in the database if you wish to fail before inserting.
    Do it in ODI and turn control static to true if you want to than his failure after insertion.

    Kind regards
    JeromeFr

  • Recover duplicate records.

    CREATE TABLE TEST (TNO NUMBER (2), TNAME VARCHAR2 (10));

    INSERT INTO TEST VALUES (1, 'TIGER');
    INSERT INTO TEST VALUES (2, 'SCOTT');
    INSERT INTO TEST VALUES (2, 'MILLER');
    INSERT INTO TEST VALUES (2, 'JOHN');
    INSERT INTO TEST VALUES (3, 'SMITH');

    SELECT * FROM TEST;

    NWT TNOM
    ----- ----------
    1 TIGER
    SCOTT 2
    2 MILLER
    2 JOHN
    3 SMITH


    power required:


    NWT TNOM
    ----- ----------
    SCOTT 2
    2 MILLER
    2 JOHN
    I want duplicate records.

    Have you tried the forum search?
    How recover duplicate records have been answered several times ;-)

    select tno, tname from (
       select tno, tname, count(*) over (partition by tno) cnt from test
    ) where cnt > 1
    
  • ROW_NUMBER and duplicate records

    Hello

    Tried to delete duplicate records. The code below works, but would remove all, rather than simply the > #1 records:

    (SELECT academic_period, load_week, sub_academic_period, person_uid, course_number,
    course_reference_number, rowid that RID, row_number() over (partition of)
    academic_period, load_week, sub_academic_period, person_uid, course_number,
    order of course_reference_number of academic_period, load_week, sub_academic_period,
    person_uid, course_number, course_reference_number)
    Of THE cea
    WHERE (academic_period, load_week, sub_academic_period, person_uid, course_number,)
    IN course_reference_number)
    (SELECT academic_period, load_week, sub_academic_period, person_uid, course_number,
    course_reference_number
    Of THE cea
    GROUP of academic_period, load_week, sub_academic_period, person_uid, course_number,
    course_reference_number
    HAVING COUNT (*) > 1))


    If I try to put 'rn' and rn > 1, I get ora-00933: Sql not correctly completed command

    SELECT academic_period, load_week, sub_academic_period, person_uid, course_number,
    course_reference_number, rowid that RID, row_number() over (partition of)
    academic_period, load_week, sub_academic_period, person_uid, course_number,
    order of course_reference_number of academic_period, load_week, sub_academic_period,
    person_uid, course_number, course_reference_number): the nurse
    Of THE cea
    WHERE (academic_period, load_week, sub_academic_period, person_uid, course_number,)
    IN course_reference_number)
    (SELECT academic_period, load_week, sub_academic_period, person_uid, course_number,
    course_reference_number
    Of THE cea
    GROUP of academic_period, load_week, sub_academic_period, person_uid, course_number,
    course_reference_number
    After HAVING COUNT (*) > 1)
    and rn > 1

    I tried to remove as"rn" and make "rn" and "rn", which gave me an error of syntax also. The '' rn > 1 and '' clause gets an error of syntax also. I gone through a bunch of different Web sites. All of this indicates the syntax I am using will work. However, any query I run into a TOAD, always error when I include the 'rn > 1.

    Any ideas? Thank you!

    Victoria

    You mix two ways to identify duplicates.

    One way is HAVING:

    SELECT academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number
    FROM cea
    GROUP BY academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number
    HAVING COUNT(*) > 1)
    

    That tells you just what combinations of your group are more than once.

    Another way is to analytical functions:

    select *
    from (
      SELECT academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number
             count(*) over (partition by academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number) cnt
      FROM cea
    )
    where cnt > 1
    

    This will all return duplicate records - if some combinations has three duplicates, then this will return all three lines.

    If you use the ROW_NUMBER() place COUNT() analytical analytical function, you get this:

    select *
    from (
      SELECT academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number
             row_number() over (partition by academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number) rn
      FROM cea
    )
    where rn > 1
    

    All of these files without duplicates will get rn = 1. Those with duplicates gets rn = 1, rn = 2... If rn > 1 Gets all "unnecessary" records - the ones you want to remove.

    If a deletion might look like:

    delete cea
    where rowid in (
      select rid
      from (
        SELECT ROWID as rid,
               row_number() over (partition by academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number) rn
        FROM cea
      )
      where rn > 1
    )
    

    Or if you want to manually inspect before you delete ;-):

    select *
    from cea
    where rowid in (
      select rid
      from (
        SELECT ROWID as rid,
               row_number() over (partition by academic_period, load_week, sub_academic_period, person_uid, course_number, course_reference_number) rn
        FROM cea
      )
      where rn > 1
    )
    

    In another answer, you can find a way to remove duplicates with HAVING.
    The point is that do you it either with or with ROW_NUMBER() - not both HAVING ;-)

  • Delete several duplicate records

    Hi all
    My table has multiple records, and I want to keep only the first record in the table. Can someone help me on this. I tried following things:
    SELECT * FROM the tab
    WHERE ROWID in (SELECT MAX (ROWID) <>
    IN tab B
    WHERE B.col1 = A.col1
    AND B.col2 = A.col2
    )
    This remove the last duplicate record.
    I also tried
    SELECT * FROM the tab
    WHERE ROWID > (SELECT MIN (ROWID)
    IN tab B
    WHERE B.col1 = A.col1
    AND B.col2 = A.col2
    )
    This was removed and the first record to some places, but it has worked in some places. I am not able to understand why it was wrong in some places.
    I'm working on Oracle 10 g
    Please suggest.

    Thank you.

    Duplicate records mean reproduce according to specific columns (in your example, col1 and col2).
    If you want the trial to be held, you must determine all first according to what, if you mean the first entered record (which is not safe, and you should rely on an explicit column).
    You can use

    SELECT *
      FROM tab A
     WHERE ROWID NOT IN (SELECT MIN (ROWID)
                           FROM tab B
                          WHERE B.col1 = A.col1 AND B.col2 = A.col2)
    

    or use a column

    SELECT *
      FROM tab A
     WHERE col3 NOT IN (SELECT MIN (col3)
                           FROM tab B
                          WHERE B.col1 = A.col1 AND B.col2 = A.col2)
    

    Saad,

  • How to delete duplicate records

    Suppose I have a table with N columns and K TAB (K < N) for which I should not have duplicated (in other words, the K column can be a key primary candidated)
    Can you give me a SQL query to delete duplicate records of TAB for columns K?
    Thank you very much!

    remove the tab where rowid not in (select min (rowid) of the TAB group by k)

  • finding duplicate records in the DB table, or the data trasnpose

    Hello

    I have a question...

    Key | UID. Start Dt | End date. / / DESC


    --------------------------------------------------------------------------------
    1. 101 | March 12 09 | 30 May 09 | UID101

    2. 101 | January 1 09 | February 25 09 | UID101

    3. 102. 13 March 09 | 30 March 09 | UID102

    4. 103. 13 March 09 | 30 March 09 | UID103

    5. 103. 13 March 09 | April 1 09 | UID103

    6. 104. 13 March 09 | 30 May 09 | UID104

    7. 104. February 25 09 | 29 May 09 | UID104

    8. 105. 15 February 09 | March 1 09 | UID105

    9. 105. April 1 09 | 30 May 09 | UID105

    The query must know UID in duplicate according to the above data, which are stored in the same form in a table. The definition of the UID duplicate is

    (1) UID repeating themselves (records by 2) ex are 101,103,104 and 105.
    (2) each UID has two dates and date of end of beginning.
    (3) the UID for which dates are overlaping. For ex: touch #4, 103 UID whose start dates are March 13 09-30-Mar-09 and there also another record, with the # 5 UID 103 key dates are 13 Mar 09 to 1 April 09. Here, there is overlap or intersection in line #4 with key #5 key dates dates of rank. This UID is duplicated UID by def.

    What precedes that falls under def and selectable are 103 and 104 only 102 UID has only a single line, UID 105 dates are mutually exclusive or not that overlap and even for the UID.

    Is there a function available DB to make use of?


    Wanted not to delete records or duplicate records.

    There is a report to display these duplicate records.

    It would be good for me if I can get the data transposed for UID

    as

    Of

    4. 103. 13 March 09 | 30 March 09 | UID103

    5. 103. 13 March 09 | April 1 09 | UID103

    TO
    UID. Start the t1d. End t1d. Start the T2D. End T2D
    103: |13-Mar-09|30-Mar-091-Apr-09 13 March 09

    Any advice or ideas can be useful to gr8

    Thank you...

    It can also be done without Analytics:

    WITH test_data AS (
      SELECT  1 AS KEY, 101 AS UD, TO_DATE('03/12/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/30/2009','MM/DD/YYYY') AS END_DT, 'UD101' AS DSC FROM DUAL UNION ALL
      SELECT  2 AS KEY, 101 AS UD, TO_DATE('01/01/2009','MM/DD/YYYY') AS START_DT, TO_DATE('02/25/2009','MM/DD/YYYY') AS END_DT, 'UD101' AS DSC FROM DUAL UNION ALL
      SELECT  3 AS KEY, 102 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('03/30/2009','MM/DD/YYYY') AS END_DT, 'UD102' AS DSC FROM DUAL UNION ALL
      SELECT  4 AS KEY, 103 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('03/30/2009','MM/DD/YYYY') AS END_DT, 'UD103' AS DSC FROM DUAL UNION ALL
      SELECT  5 AS KEY, 103 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('04/01/2009','MM/DD/YYYY') AS END_DT, 'UD103' AS DSC FROM DUAL UNION ALL
      SELECT  6 AS KEY, 104 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/30/2009','MM/DD/YYYY') AS END_DT, 'UD104' AS DSC FROM DUAL UNION ALL
      SELECT  7 AS KEY, 104 AS UD, TO_DATE('02/25/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/29/2009','MM/DD/YYYY') AS END_DT, 'UD104' AS DSC FROM DUAL UNION ALL
      SELECT  8 AS KEY, 105 AS UD, TO_DATE('02/15/2009','MM/DD/YYYY') AS START_DT, TO_DATE('03/01/2009','MM/DD/YYYY') AS END_DT, 'UD105' AS DSC FROM DUAL UNION ALL
      SELECT  9 AS KEY, 105 AS UD, TO_DATE('04/01/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/30/2009','MM/DD/YYYY') AS END_DT, 'UD105' AS DSC FROM DUAL
    )
    select  t1.ud,
         t1.key, t1.start_dt, t1.end_dt,
         t2.key, t2.start_dt, t2.end_dt
    from     test_data t1
    ,     test_data t2
    where     t1.ud = t2.ud
      and     t1.key < t2.key
      and     ((t1.end_dt - t1.start_dt) + (t2.end_dt - t2.start_dt)) >
            (greatest(t1.end_dt, t2.end_dt) - least(t1.start_dt, t2.start_dt))
    /
    

    Result:

            UD        KEY START_DT   END_DT            KEY START_DT   END_DT
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
           103          4 13-03-2009 30-03-2009          5 13-03-2009 01-04-2009
           104          6 13-03-2009 30-05-2009          7 25-02-2009 29-05-2009
    

    In addition, you will need to adjust the date a little comparison, depending on whether you set two periods where the first End_date is equal to the start_date in the second, because duplication or not.

    Published by: tijmen on December 21, 2009 06:17

  • update with the duplicate record

    I'm working on my update page and I came across the problem where it allows to update the duplicate record. My code works for the second time when I tried to update the same name.

    For example, I have the user name A, B and C of the database.

    For the first time: update the username from B to A. This allowed me to do so given the A user name already in the table. (NOT RIGHT)

    Second step: update the C to A user name. He stopped me because of the duplicate record
    NOT QUITE RIGHT, IT SHOULD BE STOPPED ME FIRST?


    Thank you

    You should probably change the first query if a line with the same id is not considered:


    Select user_name
    users
    where trim (user_name) = ' #trim (form.user_name) #
    and user_id! = #user_id #.

    If all the rows are returned from get_dupecheck then you don't want to do the update.

  • "Compression" duplicate records over time

    Hi, I've been fighting with a problem for a while now and don't know how to solve. I have data that looks like this:


    Code1... Code2... Start_Dt... End_Dt
    A.......... A......... 1/1/2000...12/31/2000
    A.......... A......... 1/1/2001...12/31/2001
    A.......... B......... 1/1/2002...12/31/2002
    A.......... B......... 1/1/2003...12/31/2003
    A.......... A......... 1/1/2004...12/31/2004
    A.......... A......... 1/1/2005...12/31/2005
    A.......... A......... 1/1/2006...12/31/2006

    What I would do in the data store is 'compress' duplicate records, so that the final result should look like this:

    Code1... Code2... Start_Dt... End_Dt
    A.......... A......... 1/1/2000...12/31/2001
    A.......... A......... 1/1/2002...12/31/2003
    A.......... B......... 1/1/2004...12/31/2006

    I can't figure a way to do it. I can just say:

    Select code1, code2, min (start_dt), max (end_dt)

    because I get A codes / has, from 01/01/2000 through 12/31/2006 - is not just, they have changed between the two.

    Does anyone know of a way to do this (base mode GAME please... not to write PL/SQL and do a rank at a time).

    Thanks in advance,
    Scott

    Hi Scott,.
    Try this SQL

    select a_code,b_code,group_id,min(start_date,max(end_date) from
    (select q.*,sum(change_flag) over (partition by a_code,b_code) group_id
            from
            (SELECT a_code,
                    b_code,
                    start_date,
                    end_date,
                    CASE
                    WHEN a_code = lag(a_code,1) over (partition by a_code,b_code ORDER BY start_date)
                       AND b_code = lag(b_code,1) over (partition by a_code,b_code ORDER BY start_date)
                    THEN 0 ELSE 1 END change_flag
                    FROM stp_test) q
    ) q2 group a_code,b_code,group_id
    

    Kind regards
    Oleg

    Edited by: oleg2 09/22/2009 06:30 - Add Group by at the end

  • How to compare the content of two files so I can delete duplicate records

    I'm trying to clean up several subfolders with duplicates without looking at the details of each record.  Is it possible in Windows XP to compare the content of two files whether they are an exact replica.

    Hi rav42010,

    Follow the steps in the article.

    Description of the tool in Windows XP disk cleanup

    http://support.Microsoft.com/kb/310312

    You can also use third-party app to perform the task using your favorite search engine.

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

Maybe you are looking for