chiranjivip has asked for the wisdom of the Perl Monks concerning the following question:

HI All, I am trying to update a database table which is having multiple row entries(duplicate data) using a perl program. Can any one please help me out on how to remove multiple entries in a database table using a perl program. Thanks, CD

Replies are listed 'Best First'.
Re: delete duplicate entries ina table
by Corion (Patriarch) on Jun 11, 2012 at 14:02 UTC

    The sanest/"safest" approach would be to consult perlfaq4 and search for "duplicate". This involves unloading and reloading the (relevant) data from your table to a file.

    I also suggest creating a database (or table) backup and reviewing the data before any deletions are made in the table.

Re: delete duplicate entries ina table
by rovf (Priest) on Jun 11, 2012 at 14:31 UTC
    You didn't say, what database you are using. Depending on that, perhaps the most efficient way would be to solve it within the database, instead of doing it with Perl.

    -- 
    Ronald Fischer <ynnor@mm.st>
      we are using sql developer as database,
        ??????

        Maybe I missed something, but I know "SQL Developer" only as an interface to control a database.
        -- 
        Ronald Fischer <ynnor@mm.st>
Re: delete duplicate entries ina table
by ww (Archbishop) on Jun 11, 2012 at 14:03 UTC
    What have you tried? (ie, show us your code)

    If not "tried", what have you read?

    If neither of the above, for what have you searched, and how?

    Update: re the consideration, /me tries to disappear in embarassment. Should be s/deleate/delete/;. Oh, the chagrin!

    A reply falls below the community's threshold of quality. You may see it by logging in.