View Single Post
Old 12-16-2012, 03:11 AM   PM User | #1
mharrison
New Coder

 
Join Date: Dec 2012
Posts: 52
Thanks: 12
Thanked 0 Times in 0 Posts
mharrison is an unknown quantity at this point
Duplicate Records only where a specific condition exists

I have a table containing Display Text, A Link Field, and a Category.
I am trying to find duplicate links, BUT only if they have the same Category.

Right now I am using a query that shows me all duplicates regardless of the category they are in. Can anyone help me figure out the missing piece for the same category part?

Here is my query:

Code:
SELECT *
FROM patterns
WHERE lnktxt
IN (
SELECT lnktxt
FROM patterns
GROUP BY lnktxt
HAVING count( lnktxt ) >1
)
ORDER BY lnktxt
mharrison is offline   Reply With Quote