How to find duplicate entries

Hi
I have table A contains 5 colums and doent contain any constraints and 1000 records are avaible
I have table B contains 5 columns contain 500 records
and table A and table B have same data types of columns
now i want to insert table B rows to table A . If table A contain same rows of table B, should not insert table B rows.
Please give me solution for with out using any contraints.

942919 wrote:
Hi
I have table A contains 5 colums and doent contain any constraints and 1000 records are avaible
I have table B contains 5 columns contain 500 records
and table A and table B have same data types of columns
now i want to insert table B rows to table A . If table A contain same rows of table B, should not insert table B rows.
Please give me solution for with out using any contraints.Not sure why you despise constraints; But below could be a way (IMAGINARY & Un-Tested) since you chose not to provide us with Sample Tables and Data
INSERT INTO table_a
select col1, col2... coln
  from table_b b
where not exists ( select 'x' from tabel_a a where a.matching_col = b.matching_col ) -- Your Matching Cols may increase, so adapt accordingly.Edited by: Purvesh K on Nov 23, 2012 4:20 PM

Similar Messages

  • How to find latest entry in the table according to time

    how to find latest entry in the table according to the time
    is there any function module to do so
    \[removed by moderator\]
    Regards
    Shashi
    Edited by: Jan Stallkamp on Aug 25, 2008 4:39 PM

    Hi,
    If you want to read the entry from an internal table,
    sort the internal table in the descending order by the time and
    delete adjacent duplicates by comparing the fields other than time and the internal table will have the latest record.
    Suggestion: instead of only time try to have one more field called date with the time combination
    Regards,
    Ramesh

  • My family put multiple devices on the icloud, and I need to know how to manage duplicate entries.  Specifically contacts.  If I fix the contact list on my pc will it push the info out to the other devices and maintain it correctly?

    My family put multiple devices on the icloud, and I need to know how to manage duplicate entries.  Specifically contacts.  If I fix the contact list on my pc will it push the info out to the other devices and maintain it correctly?

    All devices signed into the same iCloud account will finish up with the same contacts. Of course if prior to joining iCloud two family members each had an entry for Uncle Fred, then you will finish up with two contact cards for Uncle Fred, and so on. If you tidy this up on your computer then the changes will propagate to everyone else.

  • 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 check duplicate entries in internal table??

    Dear Friends,
    How to check duplicate entries in internal table??
    Exp: In my internal table if I am having the same records more then ones then I need to print the error message, here I am using steploop for selecting the values from screen, and the values are coming into my internal table if user enter the same value more then ones I need to print the error message.
    Thanks,
    Sridhar

    Hi,
    After storing the data into internal table say ITAb, move the data into another internal table.
    t_dup[] = itab[].
    LOOP AT itab.
        count1 = count1 + 1.
        itab-count1 = count1.
        MODIFY itab.
    ENDLOOP.
    LOOP AT t_dup.
        count2 = count2 + 1.
        t_dup-count2 = count2.
        MODIFY t_dup.
    ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM itab.
      LOOP AT t_dup.
        record_dup = 'N'.
        READ TABLE itab WITH KEY count1 = t_dup-count2.
        IF sy-subrc = 0.
          record_dup = 'Y'.
        ENDIF.
        IF record_dup NE 'Y'.
          t_dup-message = 'DUPLICATE ENTRY'.
          t_dup-flag = 1.
          MODIFY t_dup.
        ENDIF.
      ENDLOOP.
    Use this sample code.
    Reward pts if it is helpfull.
    Regards
    Srimanta

  • 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 duplicate song in "itunes 11" ?

    How to find duplicate song in "itunes 11" ? - Why apple delete this function ?

    Your response is not clear.  Are you referring to Apple's lack of information?

  • How to delete duplicate entries in address book

    Is there an easy way to delete duplicate entries in Address Book?

    I have an iPhone where I create new contact details and a MB Air running OX X 10.7.3
    In Address Book I see duplicate entries across the whole book. The other day I was traveling without my MB and needed to urgently reach someone who's number I knew was in my iPhone contact list for sure but searched and search and couldn't find it.
    Turns out that when I had been going through the Adress Book on the MB Air trying to eliminate some of the duplicates I had chosed --without even knowing it or realzing it-- the card that I guess sync with my iPhone. It was gone. Sure enough, when I got back and looked it up on the MB Air it was still there not syncing to my iPhone.
    I have used Address Book / Card / Look for Duplicates ...
    I have also followed the Help suggesting and pressed Control / select to highlight two duplicate cards and even though the First / Last / Company / phone numbers / etc. are all the same I get the message: "The cards could not be merged because they came from different accounts."
    I have checked with guys from the office who have the exact same problem with no idea how to solve the problem.
    Is it that in order to use Address Book on both an iPhone and an OS X machine you've just got to be smarter, more sophisticated, more IT oriented?
    Seems like a pretty easy thing not to be struggling with.
    I should mention that I was a Mobile Me subscriber and now use iCloud which I'm sure has something to do with all of this.
    But it seems pretty basic to me. If I have an Address Book it should synchronize between OX X and IOS.

  • Help needed in finding duplicate entries in invoices

    Hi,
    let me explian u the senario.
    when we enter the invoice no. in vf03 and select any item and click on pricing button.
    there i find the Cnty fild having duplicate entries like xr1 2 times and xr2,xr3,xr4,xr5 and xr6 all 2 times
    so i need to write a query to find out which of all the invoices have these types of duplicate entries.
    regards,
    maqsood

    Hi!
    CnTy is header line of condition type column.
    There can be several reasons, why conditions types are twice in a document. E.g. conditions can be given on header and line level, so they are two times in a document.
    These tax conditions are just line level. But please check, if they have different colors. I currently don't remember if only the blue or only the black lines (with or without highlight) are relevant for the document.
    The inactive conditions are still shown, but not 'counted'. You can set conditions inactive by requirements, by formula, by exclusion groups... so there are many ways to set the system up.
    Only if your total is wrong you have to do something (e.g. give users a training how to create a sales order / invoice).
    Conditions for invoice can be found in KONV with KONV-KNUMV = VBRK-KNUMV.
    Regards,
    Christian

  • How to delete duplicate entries in table for the object DNL_CUST_BASIS2

    Hi All,
    I am trying to download the object DNL_CUST_BASIS2.
    In the SMQ2 the status is SYSFAIL.
    I checked in the ST22 for dumps.It says about the error while accessing the table T006.
    While analysing this,i found some duplicate entries in the related tables of this object.
    Can somebody help me how to delete these duplicate entries?
    Thanks,
    Senthil.

    Delete them directly from the table using se16:
    select the entries in the classic view (not ALV or grid view).
    activate the debugger.
    press the view button. --> you'll enter in the debugger
    press F7
    locate the sy-ucomm variable & change it to "DELE".
    press F8
    delete the entries.
    Trick-shots
    but it works!
    Michael.

  • Finding duplicate entries in address book

    I am using Address Book 5.0.3, where I have been using LinkedIn's CardMunch to import contact details via my iPhone. However, I now end up with three distinct issues regarding duplicate entries:
    1/ two people with the same name, e.g. John Smith, but I know they are two separate people and they work for different companies.
    2/ After an import, I may have some duplicate entries, say Alan Walker, who has moved from company A to company B and I want to replace his old contact details with the new information.
    3/ two duplicate entries the same name, say Brian Vickers, both of which refer to the same person who still works for the same company, but has new contact details or additional data, such as a mobile number that I did not have before.
    4/ two duplicate entries that are identical. E.g. I imported the same card twice for some reason.
    5/ multiple entries marked 'Cannot Read Name', where CardMunch had a problem, but I know they are different people and I have to edit these to manually enter the correct information.
    Unfortunately the Address Book find duplicates function, whilst it works, does nothing useful. The only option I am presented with is 'Merge', which in all of the scenarios above apart from item 4 I do not want to do a merge function - I want to either 'Mark as NOT Duplicates' (item 1/), 'Replace Selected Fields' e.g. show me the two cards side by side and allow me to select which fields from which card are to be kept, replaced or removed and then implement the merge (item 2), "Add New Information' but allow me to select the label for that information before merging so that if someone has a new iPhone, but is still keeping their old mobile, I can select the field label correctly and then merge (item 3) or 'Edit Card' which allows me to open any identified duplicate and add in missing information that would mean that it is no longer a duplicate item.
    Can anyone suggest a way of doing this, or can Apple's developers please add these features to the Address Book App as soon as possible?
    Thanks, Russ Taylor

    books06,
    Welcome to Apple Discussions.
    It depends upon which version of Address Book you are using, and your definition of "view."
    1. Address Book 3.1.1 Help
    2. Address Book 4.0.3 Help: Combining duplicate cards and information
    To find and merge duplicate cards:
    1. Choose Card > "Look for Duplicate Entries."
    2. Address Book tells you if it finds duplicate cards, cards containing duplicated information, or both.
    3. Click Merge to merge duplicate cards and remove redundant information on cards.
    When Address Book merges duplicate cards, it creates a single card for the contact containing all of the unique information from each merged card. Address Book uses the picture from the merged card appearing first in the list.
    To merge selected cards only, Command-click to select the cards you want to combine and choose Card > Merge Selected Cards. Address Book creates a single card using the name and picture of the selected card appearing first in the list.;~)

  • Finding duplicate entries in an int[]

    Okay, So I need to solved the following problem.
    Given an int[] or Integer[] with 1,000,000 entries. There are 2 entries out of the 1,000,000 that are duplicate. I need to find and return the duplicate entry.
    Obviously iteration is out of the question given the size of the array, and converting to an arraylist would likewise not help alot.
    Please offer any suggestions

    well I tried this....
    public class Main
         public static void main(String[] args)
              int list2[] = new int[1000000];
              for (int i=0; i < 1000000; i++)
                   list2[i] = i;
              System.out.println(getDouble(list2));
         public static int getDouble(int[] intArray)
              ArrayList<Integer> list = new ArrayList<Integer>();
              for (int i=0; i < intArray.length; i++)
                   list.add(intArray);
              for (int i=0; i < list.size(); i++)
                   Integer a = list.get(i);
                   if (list.indexOf(a) != list.lastIndexOf(a))
                        return list.get(i);
              return 0;
    }and it takes forever.  So if you have a really fast way, a hint would be nice :-).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to find duplicates in iPhoto? please!!

    How do i find duplicates in iPhoto? Please!?

    Some apps for dealing with duplicates in iPhoto
    iPhoto Library Manager
    Duplicate Annihilator
    Decloner
    iPhoto Duplicate Cleaner

  • How to find duplicate row in sql query?

    Hi All,
    Please solve my query, find duplicate row and how to count its. your suggestion would be greatly appreciated.

    You can use group by and having.
    SQL> WITH t
      2       AS (SELECT       LEVEL id
      3                 FROM   DUAL
      4           CONNECT BY   LEVEL <= 5
      5           UNION ALL
      6           SELECT       LEVEL + 2
      7                 FROM   DUAL
      8           CONNECT BY   LEVEL <= 3)
      9  SELECT   *
    10    FROM   t;
            ID
             1
             2
             3
             4
             5
             3
             4
             5
    8 rows selected.
    SQL> WITH t
      2       AS (SELECT       LEVEL id
      3                 FROM   DUAL
      4           CONNECT BY   LEVEL <= 5
      5           UNION ALL
      6           SELECT       LEVEL + 2
      7                 FROM   DUAL
      8           CONNECT BY   LEVEL <= 3)
      9  SELECT     id, COUNT (*)
    10      FROM   t
    11  GROUP BY   id
    12    HAVING   COUNT (*) > 1;
            ID   COUNT(*)
             3          2
             4          2
             5          2
    SQL>

Maybe you are looking for