How to find duplicate data

Dear All,
please help me.
I have a table named OT it has two columns which i want to apply composite primary key. but when i apply it returns error ORA-02437: cannot vlidate - primary key voilated, i applied enable novalidate but error still there. please let me know how can i find where is and what is duplicate data.
please reply thank you.....

Isn't this easy to understand?
create table test_table
  col1        number,
  col2        number,
  col         varchar2(1)
insert into test_table values (1, 1, 'A');
insert into test_table values (1, 1, 'B');
insert into test_table values (1, 1, 'C');
insert into test_table values (1, 1, 'D');
insert into test_table values (1, 2, 'D');
insert into test_table values (1, 3, 'D');
insert into test_table values (1, 4, 'D');
select *
  from test_table;
COL1                   COL2                   COL
1                      1                      A  
1                      1                      B  
1                      1                      C  
1                      1                      D  
1                      2                      D  
1                      3                      D  
1                      4                      D  
7 rows selected
delete
  from test_table a
where rowid < (
                  select max(rowid)
                    from test_table b
                   where a.col1 = b.col1
                     and a.col2 = b.col2
select *
  from test_table;
COL1                   COL2                   COL
1                      1                      D  
1                      2                      D  
1                      3                      D  
1                      4                      D

Similar Messages

  • How to find duplicates in aperture

    How to find duplicates in aperture

    Aperture has no tool to search and remove duplicates. It relies on the option "Do not import duplicates", when you import images to Aperture.
    To identify duplicates search for them manually by sorting images by date or filename, or use third party tools.
    See Old Toad's list in the pos below: Most of the apps work also for Aperture:
         Re: iPhoto not asking about duplicates on importing
    i am using PhotoSweeper .It can also identify duplicates in different resolutions or edited duplicates, and lets you control the rules for marking a photo for removal - the newer one, the smaller one, the one without captions or keywords, etc.

  • How to find duplicates in bods

    how to find duplicates in bods 

    Hi Kishore refer this documents:
    http://wiki.scn.sap.com/wiki/display/EIM/DQ+Match+Transform
    http://wiki.scn.sap.com/wiki/display/EIM/Comparison+with+detect+duplicates
    SAP MDM Integration with Business Object Data services (BODS) To provide Single Version Of Truth

  • How to find the data loaded from r/3 to bw

    hi
    how to find the data loaded from r/3 to bw is correct . i am not able to find which feild in the query is connected to which feild in the r/3 . where i am geting the data from r/3 . is there any process to find which feild  and table the data is comming from . plz help
    thanks in advance to u all

    Hi Veda ... the mapping between R/3 fields and BW InfoObjects should take place in Transfer Rules. Other transformation could take place in Update Rule.
    So you could proceed this way: look at InfoProvider Data Model and see if the Query does perform any calculation (even with Virtual keyfigures / chars). Than go back to Update Rules and search for other calculation / transformation. At least there are Tranfer Rule and eventually DataSource / Extraction Enhancements.
    As you can easily get there are many points where you have to look for ... it's a quite complex work but very usefull.
    Once you will have identified all mappings / transfromation see if BW data matchs R/3 (considering calculations ...)
    Good job
    GFV

  • How to find the Data Type of a column

    Dear All,
    How to find the Data Type of a Column dynamically in oracle Form.
    Thanks and Regards,
    Fazil
    Edited by: user11334489 on Aug 25, 2012 9:06 PM

    hi,
    you can use get_item_property built-in
    eg:
    declare
       l_item VARCHAR2(10);
    begin
       l_item := Get_Item_Property('item_name',DATATYPE);
    end;

  • How to find Archive data In SAP

    Hi experts ,
    How to find Archive data in SAP throught the following tcodes FTWL & AS_afb.
    Thnx
    Venky

    Hello,
    Transaction FTWL is for the DART files (not actually archived data) that are stored in your archive server.  In order to run a query, or browse the DART file, you would need to "Import from archive" from within FTWL and then browse the file.
    I am not sure what you mean by AS_afb.  Please provide more information.
    Regards,
    Karin Tillotson

  • How to find the Date and Time of Modification of Column in aTable?

    Hi all,
    Do  you know how to find the Date and Time of Addition of Column to a Particular Table?.
    I know however, How to find the modification time of the Table. Using the below Query :
    Select Object_Name, to_Char(Last_DDL_TIME, 'DD-Mon-YYYY HH24:MI:SS') Last_DDL from User_Objects where Object_Type = 'TABLE';
    Object_Name
    Last_DDL
    Employee
    20-Aug-2013 09:23:03
    I wanted to know the Creation or Modification Date and Timestamp of all columns of Employee Table?. Is it possible at all. If possible, How to get it?.
    Regards,
    Bhaskar M

    I agree with you on that. Since its a development enviornment I can remove the column but that not my point here.
    My whole purpose it to know whether we get the Column's Creation or Modification DateTime.

  • How to find the date my iPhone 4s was manufactured

    Hi, Please can anyone tell me how to find the date my iPhone 4s 64gb was manufactured. I have the serial and i-m-e numbers. For some reason my Insurance company want to know, all I wanted to do was add the phone to my all risks policy. Thanks in advance for any advice.

    That's all you will get, there is no way to know the manufactured date only the warranty status from date of original sale and it is most unlikely your warranty is still "good" on an iPhone 4

  • Could someone tell me how to find purchase date so I can register

    Could someone tell me how to find purchase date so I can register my Airport extreme on the Apple Support Profile page?

    Unless something has changed, the Apple does not provide a specific support warranty for their AirPort products. Instead, typically, you would get this type of warranty only if your purchased an Apple desktop or laptop at the same time and the AirPort would be covered under that one.
    If you bought the AirPort directly from Apple, they should have a copy of the receipt. Otherwise, if you used a credit card, check with your card provider.

  • How to find duplicate files in Finder with Automator or Apple ScriptEditor

    Can anyone tell me how to find duplicate files in Finder with Automator or Apple ScriptEditor.

    D'oh!  It's actually fairly easy - I just right clicked on the file, Get Info, Artwork tab, then dragged the picture to the desktop, from where I can do what I like with it.  Never mind, nothing to see here, carry on.

  • How to find login Date of a user

    Hi,
    Can someone please tell me how to find the date when a user logged into the messaging server.
    What i am actually trying to do is as follows : I wan't to disable the account of a user if he does not access his mailbox for some time period.
    The login date & time of a user can be seen from the logs but is there some other place/file where this is available?
    Regards,
    Shveta.

    The logs are the only place where this information is available, currently. We are going to address this in a future release of the mail server. I can't provide detailed specifics, but know that things will get better in future versions.
    Regards,
    Chad

  • How to find creation date of a cron job in RHEL 5

    We have instances having RHEL 5.10 in our setup. I wanted to know how to find the creation date of a cron job in RHEL 5. I was investigating a cron job, hence the query to know the creation date of a cron job.
    I hope my question is clear.
    Requesting a reply to my query.
    Regards

    Sorry to have upset you, but I cannot understand your accusation. Could you please explain where you see aggression in my problem evaluation or where I implied "how dare you"?
    I also provided an explanation why the cronfile in /var/spool/cron is not helpful. If I'm wrong, by all means, please let me and anyone else know.
    If no filesystem is specified I assume the default file system, which under OL 6 is ext4 and xfs under OL 7. Furthermore I was assuming ext3 due to other questions the OP has been asking in a similar context, which you may have not seen. For example: How to find creation date of a file in RHEL 5

  • How to find Installation Date for each SQL installation

    Dear All,
    I need a basic info. How to find installation date of each SQL instance (My environment running with multiple standalone/cluster instances)?
    So, I need a query to find installation date easily (I don't want to check it in registry by manual). Thanks in advance...

    Hi Balmukund
    This is the same answer that (1) Prashanth posted
    from the start, letter on (2) Stan posted
    this again with the same link, and now for the third time, (3) you posted it with the same link :-)
    * This answer is correct for specific instance.
    The OP asked a solution for several instances. Therefore he should execute this on each instance. As I mentioned he can do it dynamically on all instances, for example using powershell (basic logic is, first find all instances and than post this query in a
    loop).
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]
    Then your answer is correct :)
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • How to avoid duplicate data while inserting from sample.dat file to table

    Hi Guys,
    We have issue with duplicate data in flat file while loading data from sample.dat file to table. How to avoid duplicate data in control file.
    Can any one help me on this.
    Thanks in advance!
    Regards,
    LKR

    No, a control file will not remove duplicate data.
    You would be better to use an external table and then remove duplicate data using SQL as you query the data to insert it to your destination table.

  • REgd  How to find appropriate data sourses for given tables in Inve Mngt

    Experts!
    M completely new to Inventory Mngt where i needto extract data from R/3,
    they 've given me some tables, but i dont know how to find appropriate data
    sourses for that tables
    those are
    MKPF,MSEG
    EKKO,EKPO
    EKBE,EKET
    How to find right data sourses when table names given in any module??
    pls guide me,
    'll assign the points.
    thanks
    Srujan

    Hi,
    2LIS_03_BX is the initialization of your stocks; you'll need to perform the setup procedure for extracting this data.
    Usually this DSource is used to bring the stocks positions at a given time; from this given time you'll then extract deltas from BF and UM so your stocks are always:
    BX + BF(Delta) + UM(delta).
    Hope this clears your doubts...
    Olivier.

Maybe you are looking for

  • Complaint of nokia care centre in punjab india

    i bought a nokia c5 mobile fone in feb 2012. after 6 months its charging port got damaged. when i showed it to nokia care in my district in sangrur (punjab) , they repaired it out of warrantee and took 1000 rupees. after this in december 2012 its dis

  • MXF clips do not open in CS4

    Hi guys, I have Sony DXCAM's MXF's which I can not import in Premiere (neither CS3 nor CS4). I did convert the original MXF's using Sony's DXCAM software. Adobe claims it supports MXF files. Another editing company which uses CS3 can import XMF's usi

  • Configuration of saprouter.

    Hello, I have reinstalled the saprouter but after configuring the saprouter, it's giving error while starting saprouter. The error is as follows : $ ./saprouter -l SAP Network Interface Router, Version 40.4 ***LOG Q0I=> NiPGetHostByName: 'localhost'

  • I dropped my ipod in the pool and put it in rice for three days and now the screen stays white. what is the cheapest way to fix my ipod?

    i dropped my ipod in the pool and put it in rice for three days and the screen just stays white now. what is the cheapest way to fix thiss?

  • With out collect statement

    thanks for u r replys for cummulate the quantity. but collect only will cumulate the quantity where non numeric values match. but my example contains numeric and non numeric unique fields. what is the other solution for this.