WHERE product_number IN (SELECT ItemID FROM discontinued)
A little schema speculation.. perhaps you should use a status flag/bit on your product table instead of keeping a seperate discontinued table? I don't really know what you're doing exactly, but it's just a thought.
I would love to add that flag but alas the destination table (product) is preformated for a shopping cart and I am not adept enough just yet to add a field for that flag without the shopping cart crashing on it , and my supplier is giving me inventory updates in a totally different format with basically ItemID being the only field that I can use to correlate and update my inventory . Not the best of scenarios but until I understand all this better , I'm kind of stuck with it .
Thanks for the code , I'm going to jump right into it !