SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Help Removing Duplicate Data from MYSQL Dabase.

    I need to remove duplicate entrys in MYSQL PHPMYADMIN

    can someone help please...

    Database Name: FaxData
    Table: Fax_fps_data

    Fields:

    cli
    dateadded
    action
    notes


    Data Looks like the below...

    cli dateadded action notes
    ------------------------------------------------------------------------
    02783 2767777 2010-08-21 11:22:07 Added Client Updated
    02783 2767777 2009-08-21 11:22:07 Added Client Updated

    Field: cli < is there the duplicate data is show as below...

    cli
    -----------
    02783 2767777
    02783 2767777 < duplicate
    02784 2747777
    02784 2747777 < duplicate

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    But the 'action' column contains different data.
    So which row would you like to keep?

  3. #3
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    But the 'action' column contains different data.
    So which row would you like to keep?
    Table is Fax_fps_data and Field is cli So I need to remove all the dupli

    cli
    -----------
    02783 2767777
    02783 2767777 < duplicate
    02784 2747777
    02784 2747777 < duplicate

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by jamesclues View Post
    Table is Fax_fps_data and Field is cli So I need to remove all the dupli

    cli
    -----------
    02783 2767777
    02783 2767777 < duplicate
    02784 2747777
    02784 2747777 < duplicate
    But the 'action' column contains different data.
    So which row would you like to keep?

  5. #5
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All I need to do is remove all duplicate rows the cli have duplicate telephone numbers in, the action is just notes like no answer, live, added

  6. #6
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Capture.GIF

    Screen capture of phpmyadmin ones highlighted in yellow are duplicates i need to remove hope this helps.... I want to keep the columns but if there is a duplicate delete the row with the column data

  7. #7
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Capture.gif

    This is what I want to do From Table: Fax_fps_data I want to remove duplicates as per screen print. I can not do it manually as there is over 50,000 rows

  8. #8
    SitePoint Enthusiast
    Join Date
    Aug 2011
    Location
    OH, USA
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    guido2004 asked you you have different dateadded value on records on your first post, which one you need to keep?
    on your screen print all dateadded is 0 and on your data not...
    do you need just display cli witn no duplicates?
    if so just
    select cli
    from Fax_fps_data
    group by cli


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •