Very advanced query, checking for existing combinations...
The tables are structured such as:
itemNo, Property, Value
So you can have a table that looks like this:
001, a, 1
001, b, 2
001, c, 3
001, d, 0
002, a, 1
002, b, 2
002, c, 3
002, d, 4
Notice that the value of the D Property for itemNo 001 is 0, compared to 4 on itemNo 004. If a user is configuring up itemNo 003, like this...
003, a, 1
003, b, 2
003, c, 3
003, d, 0
... a message should fire off saying an item with that configuration already exists. Likewise if they change it to be 003, d, 4, the same message should display.
I have tried joining the tables together, and grouping them, but because the first three rows match for each itemNo, the results are incorrect. The only other option I see is looping through each itemNo and comparing the property and value columns of my user values with each respective in the itemNo table, which could possibly have thousands and thousands of rows.
Any ideas?

