﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Training  / how to delete duplicate records / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Thu, 04 Dec 2008 02:47:40 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: how to delete duplicate records</title><link>http://www.teradata.com/teradataforum/Topic6079-13-1.aspx</link><description>  Thanks barry,ramakrishna for your suggestions.It really helped me a lot.&lt;br&gt;rgds.,&lt;br&gt;Nagendhran</description><pubDate>Tue, 19 Dec 2006 05:30:27 GMT</pubDate><dc:creator>Nagendhran</dc:creator></item><item><title>RE: how to delete duplicate records</title><link>http://www.teradata.com/teradataforum/Topic6079-13-1.aspx</link><description>Export the records to a flatfile and then load using fastload. Fastload does not load the duplicate records.</description><pubDate>Tue, 19 Dec 2006 00:26:23 GMT</pubDate><dc:creator>ramakrishna_vedantam</dc:creator></item><item><title>RE: how to delete duplicate records</title><link>http://www.teradata.com/teradataforum/Topic6079-13-1.aspx</link><description>Another option that I thought of after my last post is to export the dup rows (with a GROUP BY on all columns and HAVING COUNT(*) &gt; 1) to a file.  Then, using Mload or Tpump to bring the rows back in and do a delete and insert for each row.&lt;br&gt;&lt;br&gt;With this method, there is no need for a 2nd table and you won't see all of the dups rows disappear from the table at the same time.  The re-insert of each dup row will occur immediately after the deletion of the rows.&lt;br&gt;&lt;br&gt;</description><pubDate>Fri, 15 Dec 2006 08:36:07 GMT</pubDate><dc:creator>Barry</dc:creator></item><item><title>RE: how to delete duplicate records</title><link>http://www.teradata.com/teradataforum/Topic6079-13-1.aspx</link><description>If you're saying you cannot create a new table at all to assist you in removing dups, I don't think there is a way to do that.  I would suggest 3 options:&lt;br&gt;&lt;br&gt;1) Insert/select into a new SET table.  Then drop the old table and rename the new one to the old name.&lt;br&gt;&lt;br&gt;2) Insert/select into a new table grouping by (or using distinct) on all columns.   Then drop the old table and rename the new one to the old name.&lt;br&gt;&lt;br&gt;3) Insert only the dups into a 2nd SET table (by doing a group on all columns with a HAVING COUNT(*) &gt; 1).  Then do a delete/join (joining the dups table back to the original table), followed by an insert/select from the dups table into the first (in the same unit of work if you need to).  This will at least keep the existing table intact, but the dups will be temporarily deleted before one copy of them is inserted back in.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  </description><pubDate>Fri, 15 Dec 2006 08:29:55 GMT</pubDate><dc:creator>Barry</dc:creator></item><item><title>how to delete duplicate records</title><link>http://www.teradata.com/teradataforum/Topic6079-13-1.aspx</link><description>Hi,&lt;br&gt;   Can anyone suggest me on how to delete the duplicate records from a  teradata table.I should not create a new similar table,but delete from the existing table only.&lt;br&gt;      &lt;br&gt;thanks,&lt;br&gt;Nagendhran</description><pubDate>Fri, 15 Dec 2006 06:27:26 GMT</pubDate><dc:creator>Nagendhran</dc:creator></item></channel></rss>