Ok, I'm stumped. Maybe it's an easy one, but I can't see it. I searched the FAQ's as well, so feel free to point me in the right direction if I missed it.Give the following table: DECLARE @compare TABLE(Store INT,Item VARCHAR(3),Quantity INT)INSERT @compare VALUES(1, 'A', 20)INSERT @compare VALUES(1, 'B', 50)INSERT @compare VALUES(2, 'A', 50)INSERT @compare VALUES(2, 'C', 30)INSERT @compare VALUES(3, 'A', 20)INSERT @compare VALUES(3, 'B', 50)INSERT @compare VALUES(4, 'A', 20)INSERT @compare VALUES(5, 'A', 50)INSERT @compare VALUES(5, 'C', 30)SELECT * FROM @compare
I need to find out which stores have the exact same set of Item-Quantity values. In the above data, for instance, I would have 3 groups: stores 1 & 3, stores 2 & 5, and store 4. Any ideas on a good way to do this? It was even super-complicated using cursors.Thanks.