I need to write query that will find all items from the column Description that have duplicates that are the same or similar.
My current query will find all values that are exactly the same, but it must include similar values; for example SQL Sql and sql.
SELECT
Description, COUNT(*) AS Count_Of
FROM
Source
GROUP BY
[Description]
HAVING
COUNT(*) > 1
I know how to use LIKE to search the table for all items similar to something I define, can I apply it to this problem?
Any and all help is greatly appreciated, thank you.
--Editted 3/26/13
When I say similar, I mean more than case sensitive. I am working with company names and must account for people using different names such as Monsters Inc and Monsters Incorporated.
I would also like the output to display what the Description is so that I know what companies have redundancies in the database.
I have since taken care of case sensitivity with
SELECT
LOWER (Description), COUNT(*)AS Count_Of
RESOLVED
I have a query to find all that are exact that repeat, and I also have a query that will find all like items for an item I specify.
What I did to solve it was running the first query and storing all the repeated items in a table, and then modifying the second query so when run it would find all similar items there where for each item in the table I just created.
Thank you very much to all that helped