SQL Query to find different values in field2 that have the same value in field1
Posted on 2011-03-18
I am trying to write a SQL Query that will find rows in a table, where there are different
values found in field two that the same value in field1. But, only when the inner query
results, show that the field1value appears more than once.
For example, if we have the value below:
I would like to be able to identify those rows, where AD1 has more than one value in field2.
And, I know that I can write a SQLquery as follows, but I don't wan't to group the rows in the
WHERE FIELD1IN (SELECT FIELD1
GROUP BY FIELD1, FIELD2)
GROUP BY FIELD1,FIELD2,FIELD3
Big Thanks in advance!