I m having some trouble writing a query.
For example:
Let s say I have just one table with the following values:
Items
+-----+--------+
| ID | NAME |
+-----+--------+
| A1 | Item_1 |
| A1 | Item_2 |
| A1 | Item_3 |
| A2 | Item_1 |
| A2 | Item_2 |
| A3 | Item_1 |
+-----+--------+
From this, I want to identify all of the item names that are associated with more than one ID, along with the associated ID names.
Given this example the output would be --
+----+--------+
| ID | Name |
+----+--------+
| A1 | Item_1 |
| A2 | Item_1 |
| A3 | Item_1 |
| A1 | Item_2 |
| A2 | Item_2 |
+----+--------+
Item_3 would be excluded since there is only one instance of it, associated with A3.
I m using SQL Server 2008. Thanks in advance!