Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Remove Duplicate Values in Field

  1. #1
    Join Date
    Nov 2010
    Posts
    10

    Default Remove Duplicate Values in Field

    Hi All,

    I have Table with have Email field inside. There are many duplicate email values in that table.How i can delete duplicate email values with PDI ?

    Help me please,

  2. #2
    Join Date
    Mar 2011
    Posts
    257

    Default

    you could grab all the DISTINCT values and then store them in a staging table clear the old table and put them back (don't do it directly on the existing table)...
    or you can use a group by and start deleting until only 1 of the adresses remain.

  3. #3
    Join Date
    Jun 2007
    Posts
    260

    Default

    DELETE FROM users WHERE id NOT IN (SELECT MIN(id) FROM MyTable GROUP BY email);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.