I run a wine company and different vintages (years) of wine typically share a same UPC code. So we've set up matrices where a UPC code is scanned, and we use matrix functionality to specify which vintage we are selling; it is not uncommon at all for multiple vintages to be available at any given time.
My problem is when a vintage completely sells out, I can mark the item inactive, yet the sold-out product still shows up as an option when I scan the UPC of a newer vintage of the same product.
I have probably hundreds of these to deal with. I know I can manually go in and remove the inactive item from the matrix master so it doesn't show up when scanned, but I was hoping one of you might have a clever way of doing this with SQL or something.