Ot - removing duplicates in lists

hi
sorry for the ot question.
i created a very long list of keywords (for seo).
anyone knows of a tool to remove duplicates? it's really a
very long list
thanks
lenny

hi
thank you all
lenny
"Walt F. Schaefer" <[email protected]> wrote in
message
news:g80fba$9ng$[email protected]..
> If the list is that long you have at least 10X too many
words for a single
> site. You cannot successfully optimize for a gazillion
keywords. It's all
> about keyword density.
>
> --
>
> Walt
>
>
> "lenny" <[email protected]> wrote in message
> news:g7vot2$h1u$[email protected]..
>> hi murray
>>
>> i need the list for adwords, for creating content
etc.
>>
>> thanks
>>
>> lenny
>>
http://www.big-t-shirts.com
>>
>>
>>
>> "Murray *ACE*"
<[email protected]> wrote in message
>> news:g7vn9p$fd3$[email protected]..
>>>> i created a very long list of keywords (for
seo).
>>>
>>> This is not a worthwhile thing to do. The
keywords meta is ignored by
>>> the major search engines.
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do
so!)
>>> ==================
>>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>> ==================
>>>
>>>
>>> "lenny" <[email protected]> wrote in
message
>>> news:g7vmt6$f1t$[email protected]..
>>>> hi
>>>>
>>>> sorry for the ot question.
>>>>
>>>> i created a very long list of keywords (for
seo).
>>>>
>>>> anyone knows of a tool to remove duplicates?
it's really a very long
>>>> list
>>>>
>>>> thanks
>>>>
>>>> lenny
>>>>
>>>
>>
>>
>
>

Similar Messages

  • Remove duplicates for list object

    Hi,
    I have retrieved all the xml node values in List<object>. Now, I want to remove all the duplicates objects from that list.
    Example:
    If the object has n properties, I should remove only duplicate objects that have same values in all the n properties not just one property as ID or name. Please let me know how to achieve this. Preferably using LINQ. 
    Thank you.
    Regards,
    Kiran

    You can use a GroupBy.  I took the code from last posting
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml;
    using System.Xml.Linq;
    using System.IO;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string file1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "<Method>" +
    "<ID>1234</ID>" +
    "<Name>manager</Name>" +
    "<Path>path1</Path>" +
    "</Method>" +
    "<Method>" +
    "<ID>5678</ID>" +
    "<Name>manager</Name>" +
    "<Path>path2</Path>" +
    "</Method>" +
    "<Method>" +
    "<ID>5678</ID>" +
    "<Name>manager</Name>" +
    "<Path>path2</Path>" +
    "</Method>" +
    "</Methods>";
    string file2 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "<Method>" +
    "<Path>path1</Path>" +
    "<Description>text</Description>" +
    "</Method>" +
    "<Method>" +
    "<Path>path2</Path>" +
    "<Description>text</Description>" +
    "</Method>" +
    "</Methods>";
    string file3 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "</Methods>";
    StringReader reader = new StringReader(file1);
    XDocument doc1 = XDocument.Load(reader);
    reader = new StringReader(file2);
    XDocument doc2 = XDocument.Load(reader);
    reader = new StringReader(file3);
    XDocument newXDoc = XDocument.Load(reader);
    var results = from e1 in doc1.Descendants().Elements("Method")
    join e2 in doc2.Descendants().Elements("Method")
    on e1.Element("Path").Value equals e2.Element("Path").Value
    select new XElement("Method", new object[] { e1.Element("ID"), e1.Element("Name"), e2.Element("Description") });
    var results2 = results.AsEnumerable()
    .GroupBy(x => x.Element("ID").Value);
    var results3 = results2.AsEnumerable()
    .Select(x => x.Take(1));
    newXDoc.Descendants("Methods").Last().Add(results3);
    jdweng

  • Having trouble removing duplicates from list

    Hello
    I am strugling with this
    I have a ArrayList as i am adding stuff in it i want to make sure i am adding just the Unique stuff. I am adding objects of class paper in the list. paper class has an attribute called color. so i have overwritten the equals method of paper class like this
    public boolean equals(Object other)
    if (!(other instanceof paper)
        return false;
    paper detTo = (paper) other;
              return detTo.getColor().equalsIgnoreCase(this.getColor());
    }while I am adding stuff to the list i am doing this
    List onlyColor = new ArrayList();
    while (li.hasNext())
    paper p1 = (paper) li.next();
    if (!onlyColor.equals(p1)) //only add when equals returns false?
       onlyColor.add(p1);
       System.out.println("Adding: " + p1.getColor());
    }but it is still adding duplicate stuff in the list (onlyColor). what am i doing wrong!? i heard that i should overwrite the hashcode as well...but how can i do it..can anyone help? Also does it matter that class paper is extending another class called utilities. and getColor() attribute is actually in the utilities class..?
    Thanks! please help me solve this :(
    Message was edited by:
    Omnipresent
    also, if i chance the equals method to always return true by default
    public boolean equals(Object other)
    if (!(other instanceof paper)
        return false;
    paper detTo = (paper) other;
              return true;
    }and then change
    if (!onlyColor.equals(p1)) to
    if (onlyColor.equals(p1)) nothing is being added to the list!! i am suspicious if my overwritten equals method is even called!!?!?

    i am planning to get this book
    http://www.amazon.com/Certified-Programmer-310-055-Certification-Guides/dp/0072253606
    have u come across this one before?
    if i go thru this..do u you think i'll be uptodate
    with java5?That's what the goal of that book: getting you ready for a Java 5 certification. Personally I'd start with a decent Java book like this one: http://www.sun.com/books/catalog/gosling_JPL4.xml
    and perhaps a data structures and algorithms book.
    After that, buy yourself a certification book to see what's important to know when taking an exam.
    A certification book will not make you a good programmer. Don't get me wrong: a decent Java book won't make you a good programmer over night either, but it's (IMO) a better basis to learn the language than a certification book.

  • Removing duplicate values from selectOneChoice bound to List Iterator

    I'm trying to remove duplicate values from a selectOneChoice that i have. The component binds back to a List Iterator on the pageDefinition.
    I have a table on a JSF page with 5 columns; the table is bound to a method iterator on the pageDef. Then above the table, there are 5 separate selectOneChoice components each one of which is bound to the result set of the table's iterator. So this means that each selectOneChoice only contains vales corresponding to the columns in the table which it represents.
    The selectOneChoice components are part of a search facility and allow the user to select values from them and restrict the results that are returned. The concept is fine and i works. However if i have repeating values in the selectOneChoice (which is inevitable given its bound to the table column result set), then i need to remove them. I can remove null values or empty strings using expression language in the rendered attribute as shown:
    <af:forEach var="item"
    items="#{bindings.XXXX.items}">
    <af:selectItem label="#{item.label}" value="#{item.label}"
    rendered="#{item.label != ''}"/>
    </af:forEach>
    But i dont know how i can remove duplicate values easily. I know i can programatically do it in a backing bean etc.... but i want to know if there is perhaps some EL that might do it or another setting that ADF gives which can overcome this.
    Any help would be appreciated.
    Kind Regards

    Hi,
    It'll be little difficult removing duplicates and keeping the context as it is with exixting standard functions. Removing duplicates irrespective of context changes, we can do with available functions. Please try with this UDF code which may help you...
    source>sort>UDF-->Target
    execution type of UDF is Allvalues of a context.
    public void UDF(String[] var1, ResultList result, Container container) throws StreamTransformationException{
    ArrayList aList = new ArrayList();
    aList.add(var1(0));
    result.addValue(var1(0));
    for(int i=1; i<var1.length; i++){
    if(aList.contains(var1(i)))
         continue;
    else{
    aList.add(var1(i));
    result.addValue(var1(i));
    Regards,
    Priyanka

  • Help needed in removing duplicate items of list box  in java

    How to remove duplicate items of list box while dynamically inserting (on-click event)
    It is not identifying duplicate data
    Variable name is HP_G1
    HP_dmg1 = (DefaultListModel) HP_G1.getModel();
    int a = HP_G1.getModel().getSize();
    System.out.println("HP list no--------> "+a);
    if(a!=0)
    for (int j=0; j<a; j++)
    String item1 = String.valueOf(HP_List.getModel().getElementAt(j));
    System.out.println("HP list added--------> "+item1);
    if(HP_dmg1.equals(item1)){
    HP_dmg1.remove(j);
    else
    HP_dmg1.addElement(GPL);
    }

    Your code is unreadable, so I'll ignore it. In the future please press the message editor's CODE button to format code.
    As to your problem, to the point you normally use a Set instead of List when you don't want duplicates in a collection.

  • HT2905 How to remove duplicate songs from the iPhone when the duplicates are not listed in the iTunes library on the computer.

    How can I remove duplicate songs from the iPhone4. The duplicates are not listed in the computer iTunes library.

    The simplest thing may be to back-up and then restore the iPhone. If you don't fancy that then remove all media that is currently synced to it, then double check and manually remove any media that remains on the device, before reselecting your sync options.
    If you've been manually managing the device and your library doesn't contain copies of all your media then see Recover your iTunes library from your iPod or iOS device.
    tt2

  • HT2905 My itunes looks nothing like the examples in this tutorial.  I do not have "display exact duplicates" or "date added".  Can someone please help me remove duplicate songs?  Also, I downloaded two audio books and they are showing up in my song list.

    My itunes looks nothing like the examples in this tutorial.  I do not have "display exact duplicates" or "date added".  Can someone please help me remove duplicate songs?  Also, I downloaded two audio books and they are showing up in my song list. Why???

    'Show duplicates' is now under the 'View' menu. To see the 'Date added' column go to 'View options' from the 'View' menu and check it in the section under 'Stats'.
    Click an audiobook once to select it and hit command-i (Mac) or control-i (Windows). Go to the 'Options' tab and set 'Media Kind' to 'Audiobook'.

  • Ho to remove duplicate element in the List ?

    It seem to be very basic, but it not working, even I try different way.
    This my List [10, 10, 11, 11, 12, 12, 13, 13, 14, 14],
    now to remove duplicate elements to have at the end [10, 11, 12, 13, 14]
    my code seem to be perfect but...
    for(int i = 0; i < listA.size(); i++){
         if(i%2 == 0){
              System.out.println("ce i est un nombre pair "+i);
              listA.remove(i);
    System.out.println(listA);

    senore100 wrote:
    The problem is that every single time an element is removed, the whole ArrayList is re-shuffled, with all the elements to the right moved to the left on spot. That's why.Yes, that's right. However if you had used an Iterator over the list, you could easily have removed every other element. It's only when you use an array index that you run into this (very common) problem.

  • HT2905 how do you remove duplicate libraries from itunes

    I recently purchased a new window9.1 computer.  I tried to move the library to the new pc by using an external haddrive. The songs and other items all transfered, but the mudic remsined on the externalmedia informaiton files, I had to connect the drive to listen to music..  I worked with tech support and copied themusioc files to ITunes. When I reopened the media files and copied music were on the system.  ITunes recognzed there was missing information on the  media data file and corrected it, so oe I have 20,000 sonfs in a 10,000 song library.How do you delete massive duplicates without individually deleting10,000 songs?

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Search for records in the event viewer after the last run (not the entire event log), remove duplicate - Output Logon type for a specific OU users

    Hi,
    The following code works perfectly for me and give me a list of users for a specific OU and their respective logon types :-
    $logFile = 'c:\test\test.txt'
    $_myOU = "OU=ABC,dc=contosso,DC=com"
    # LogonType as per technet
    $_logontype = @{
        2 = "Interactive" 
        3 = "Network"
        4 = "Batch"
        5 = "Service"
        7 = "Unlock"
        8 = "NetworkCleartext"
        9 = "NewCredentials"
        10 = "RemoteInteractive"
        11 = "CachedInteractive"
    Get-WinEvent -FilterXml "<QueryList><Query Id=""0"" Path=""Security""><Select Path=""Security"">*[System[(EventID=4624)]]</Select><Suppress Path=""Security"">*[EventData[Data[@Name=""SubjectLogonId""]=""0x0""
    or Data[@Name=""TargetDomainName""]=""NT AUTHORITY"" or Data[@Name=""TargetDomainName""]=""Window Manager""]]</Suppress></Query></QueryList>" -ComputerName
    "XYZ" | ForEach-Object {
        #TargetUserSid
        $_cur_OU = ([ADSI]"LDAP://<SID=$(($_.Properties[4]).Value.Value)>").distinguishedName
        If ( $_cur_OU -like "*$_myOU" ) {
            $_cur_OU
            #LogonType
            $_logontype[ [int] $_.Properties[8].Value ]
    #Time-created
    $_.TimeCreated
        $_.Properties[18].Value
    } >> $logFile
    I am able to pipe the results to a file however, I would like to convert it to CSV/HTML When i try "convertto-HTML"
    function it converts certain values . Also,
    a) I would like to remove duplicate entries when the script runs only for that execution. 
    b) When the script is run, we may be able to search for records after the last run and not search in the same
    records that we have looked into before.
    PLEASE HELP ! 

    If you just want to look for the new events since the last run, I suggest to record the EventRecordID of the last event you parsed and use it as a reference in your filter. For example:
    <QueryList>
      <Query Id="0" Path="Security">
        <Select Path="Security">*[System[(EventID=4624 and
    EventRecordID>46452302)]]</Select>
        <Suppress Path="Security">*[EventData[Data[@Name="SubjectLogonId"]="0x0" or Data[@Name="TargetDomainName"]="NT AUTHORITY" or Data[@Name="TargetDomainName"]="Window Manager"]]</Suppress>
      </Query>
    </QueryList>
    That's this logic that the Server Manager of Windows Serve 2012 is using to save time, CPU and bandwidth. The problem is how to get that number and provide it to your next run. You can store in a file and read it at the beginning. If not found, you
    can go through the all event list.
    Let's say you store it in a simple text file, ref.txt
    1234
    At the beginning just read it.
    Try {
    $_intMyRef = [int] (Get-Content .\ref.txt)
    Catch {
    Write-Host "The reference EventRecordID cannot be found." -ForegroundColor Red
    $_intMyRef = 0
    This is very lazy check. You can do a proper parsing etc... That's a quick dirty way. If I can read
    it and parse it as an integer, I use it. Else, I just set it to 0 meaning I'll collect all info.
    Then include it in your filter. You Get-WinEvent becomes:
    Get-WinEvent -FilterXml "<QueryList><Query Id=""0"" Path=""Security""><Select Path=""Security"">*[System[(EventID=4624 and EventRecordID&gt;$_intMyRef)]]</Select><Suppress Path=""Security"">*[EventData[Data[@Name=""SubjectLogonId""]=""0x0"" or Data[@Name=""TargetDomainName""]=""NT AUTHORITY"" or Data[@Name=""TargetDomainName""]=""Window Manager""]]</Suppress></Query></QueryList>"
    At the end of your script, store the last value you got into your ref.txt file. So you can for example get that info in the loop. Like:
    $Result += $LogonRecord
    $_intLastId = $Event.RecordId
    And at the end:
    Write-Output $_intLastId | Out-File .\ref.txt
    Then next time you run it, it is just scanning the delta. Note that I prefer this versus the date filter in case of the machine wasn't active for long or in case of time sync issue which can sometimes mess up with the date based filters.
    If you want to go for a date filtering, do it at the Get-WinEvent level, not in the Where-Object. If the query is local, it doesn't change much. But in remote system, it does the filter on the remote side therefore you're saving time and resources on your
    side. So for example for the last 30 days, and if you want to use the XMLFilter parameter, you can use:
    <QueryList>
    <Query Id="0" Path="Security">
    <Select Path="Security">*[System[TimeCreated[timediff(@SystemTime) &lt;= 2592000000]]]</Select>
    </Query>
    </QueryList>
    Then you can combine it, etc...
    PS, I used the confusing underscores because I like it ;)
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • How do i remove duplicate songs on my ipod and in my library

    how do i remove duplicate songs on my ipod and in my library

    Apple's official advice on duplicates is here: Find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls such as lost ratings and playlist membership, or that sometimes the same file can be represented by multiple entries in the library and that deleting one and recycling the file will break the other.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background, this post for detailed instructions, and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed.)
    The most recent version of the script can tidy dead links as long as there is at least one live duplicate to merge stats and playlist membership to and should cope sensibly when the same file has been added via multiple paths.
    Fix the library, then syncing should fix the device.
    tt2

  • Help required on mapping to remove duplicate entries

    Hi all experts,
    I need some help in mapping. I am new to this tool. How would I remove duplicate entries in source payload? My structure is as follows
    Message Structure
    <List> 1-1
    <ParentNode> 0-unbounded
    <Child1> 0-1
    <Child2> 0-1
    Source:
    <List>
         <ParentNode>
              <Child1>PK1</Child1>
              <Child2>SomeValue1</Child2>
         </ParentNode>
         <ParentNode>
              <Child1>PK1</Child1>
              <Child2>SomeValue1</Child2>
         </ParentNode>
         <ParentNode>
              <Child1>PK2</Child1>
              <Child2>SomeValue2</Child2>
         </ParentNode>
    </List>
    Target I would like:
    <List>
         <ParentNode>
              <Child1>PK1</Child1>
              <Child2>SomeValue1</Child2>
         </ParentNode>     
         <ParentNode>
              <Child1>PK2</Child1>
              <Child2>SomeValue2</Child2>
         </ParentNode>
    </List>
    Any help?
    Thanks so much all

    Hi,
    Please note that in my reply I asked you to map ParentNode with <Child1> Please see the below.
    <Child1>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext---<ParentNode>
    Secondly: introduce split by value(for each value ) after collapse context for child1 and child2. as shown below.
    <Child1>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext>Split by value(for each value)----</Child1>
    <Child2>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext>Split by value(for each value)----</Child2>
    it will surely work,

  • HashSet doesnt remove duplicates

    Hello
    I am trying to remove duplicates from a list using this code
    Set set = new HashSet();
    ListIterator li = list.listIterator();
    while (li.hasNext())
                   A pt = (A) li.next();
                   duplicate = pt.getID(); //duplicate is declared globally
                    if (!set.add(pt))
                        System.out.println("Duplicate found: " + pt.getID());
               }but it isnt removing duplicates. I read somewhere that I should override the equals() and hashCode() methods. But I am a bit confused as to how to write my equals method. The list contains objects of class A, which has many getters and setters. The elements are considered to be duplicate when getID() getter returns same value for two objects. Can some one tell me how should i go about writing the equals method. And why the default equals method for objects isnt working in this case?
    This is how i tried to write my equals() method but it isnt working
    public boolean equals(Object o)
           if (o == this)
                 return true;
            if (!(o instanceof A))
                 return false;
            A pn =  (A) o;
            return pn.getID() == duplicate; // duplicate has been set before calling add
         }

    Sorry if I got confusing about what I was trying to say. I was actually trying to expand on your earlier post, where you mentioned that the class needs the proper implementation of equals() had hashCode().
    I went over this with one of my programmers fairly recently. He was having a hard time understanding why he was getting a false when the contents of the object were the same. Of course he did not override the equals() method and was doing an object comparison, and not one on the contents of the objects.
    Maybe the following examples will better illustrate what I was trying to say.
    Without equals:
    public class EqualityExample {
         public EqualityExample()
          * @param args
         public static void main(String[] args) {
              EqualityExample ee = new EqualityExample();
              // TODO Auto-generated method stub
              DataClass testObject1 = ee.new DataClass("A String");
              DataClass testObject2 = ee.new DataClass("A String");
              if (testObject1.equals(testObject2))
                   System.out.println("are equal");
              else
                   System.out.println("not equal");
         public class DataClass
              private String someVal;
              public DataClass(String someVal)
                   this.someVal = someVal;
    }With equals:
    public class EqualityExample {
         public EqualityExample()
          * @param args
         public static void main(String[] args) {
              EqualityExample ee = new EqualityExample();
              // TODO Auto-generated method stub
              DataClass testObject1 = ee.new DataClass("A String");
              DataClass testObject2 = ee.new DataClass("A String");
              if (testObject1.equals(testObject2))
                   System.out.println("are equal");
              else
                   System.out.println("not equal");
         public class DataClass
              private String someVal;
              public DataClass(String someVal)
                   this.someVal = someVal;
              public boolean equals(DataClass object)
                   if (object.someVal == this.someVal)
                        return true;
                   else
                        return false;
    }

  • Remove duplicate entries from dropdownlist in web dynpro abap

    How to remove duplicate entries from dropdownlist in web dynpro abap? Can someone please help me
    I have maintained the data in the z table wherein the records of particular fields are repeated but when i show that record in the Web Dynpro application dropdown list, the user should only be able to view the unique data for selection of that particular field.

    Hi,
    try this code in init method.
    use the
    Delete adjacent duplicates.
    <set the table>
    select <f1>  from <table> into TABLE <Itab> whre <condition>.
       DELETE ADJACENT DUPLICATES FROM <Itab> COMPARING <f1>.
         lo_nd_vbap->bind_table( new_items = <itab> set_initial_elements = abap_true ).

  • Trick to remove duplicate entries from tables ?

    hi.
    i have 53tables which are having duplicate entries and names of all 53 tables r listed in top_t table ?
    can any1 provide me solution to show and if possible ask for remove of those duplicates entries from each table if required ?
    daily i am removing duplicates manually ....its too tedious now !
    can any1 help me out ?

    Well, I suppose if the duplication is such that
    SELECT DISTINCT * FROM tablename;gives you the required result, then you could have a procedure that made a copy of the table, deleted/truncated the original, then inserted the distinct values back into it.
    In 10g you could even use flashback to avoid the temp copy - but it also means you can't use TRUNCATE so whether it's any more efficient I'm not sure. But just for fun and since it's urgent:
    CREATE OR REPLACE PROCEDURE dedupe_table
        ( p_table_name user_tables.table_name%TYPE )
    IS
        k_start_timestamp TIMESTAMP := SYSTIMESTAMP;
    BEGIN
        SAVEPOINT start_of_dedupe;
        BEGIN
            EXECUTE IMMEDIATE 'DELETE ' || p_table_name;
        EXCEPTION
            WHEN OTHERS THEN
                ROLLBACK TO start_of_dedupe;
                RAISE_APPLICATION_ERROR
                ( -20000
                , 'Error deleting ' || UPPER(p_table_name) ||
                   CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
                , TRUE );
        END;
        BEGIN
            EXECUTE IMMEDIATE
            'INSERT INTO ' || p_table_name ||
            ' SELECT DISTINCT * FROM ' || p_table_name || ' AS OF TIMESTAMP :b1'
            USING k_start_timestamp;
        EXCEPTION
            WHEN OTHERS THEN
                ROLLBACK TO start_of_dedupe;
                RAISE_APPLICATION_ERROR
                ( -20000
                , 'Error repopulating ' || UPPER(p_table_name) ||
                   CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
                , TRUE );
        END;
    END dedupe_table;
    SQL> select * from wr_test;
          COL1 C C
             1 A B
             1 A B
             2 C D
             2 C D
    4 rows selected.
    SQL> BEGIN
      2      dedupe_table('WR_TEST');
      3  END;
      4  /
    PL/SQL procedure successfully completed.
    SQL> select * from wr_test;
          COL1 C C
             1 A B
             2 C D
    2 rows selected.I make no claims for robustness, efficiency or human safety.
    Edited by: William Robertson on Sep 24, 2009 7:12 PM

Maybe you are looking for