Cleaning up duplicates

  • I need an example of a script where I can clean up my vendor table. For example I would like to create a table that I could print out a list of vendors that are possibly duplicate. I would like to compare phone numbers in my vendor table to see if they are the same. I would like to compare addresses using the "like" statement to see if addresses are similiar. I also need to compare address 1 to address 2 on different records to see if they are similiar. Can someone help with this?

  • Sounds like a few scripts:

    For phones,

    select phone, count(*)

    from vendor

    group by phone

    having count(*) > 1

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply