First, does anyone know any good SQL Server sites with articles and whatnot on query design, etc. Not so much basic "How to get data out of your table", but more complex topics like conditional stored procedures, working with triggers, etc. The MSDN is helpful but at times quite lacking in readibility (for me...I feel I never get an explaination of what they're doing and why it works, just "take this block of code").

And second, any pointers (or links) on how I can go about having a stored procedure query a pair of product tables to get information to display in my shopping cart? I've got:

Cart Items            StdProducts         CustomProducts
-----------          -------------       -----------------
partID                   stdpartID            custompartID
IsCustom (Bit)         
                         description          description
So depending on if the 'IsCustom' field is True or False, I want to join the [cartitems].[partID] to either the [StdProducts].[stdpartID] or the [CustomProducts].[custompartID] to get the description and other information.

Eventually, I'll probably need to branch this type of procedure out even further (not just either/or scenario) to include the option of pointing to 6-12 different child tables depending on criteria within the parent table. Depending on performance, I could either hard code in the various child tables or have another table containing the table names and the appropriate key that would indicate which table to use.

Hopefully that made some sense, since I'm not entirely positive how to go about this type of thing or what to even search for on google.