Help constructing Sql Statement/Stored Procedure
Posted on 2011-02-18
I'm not sure if this is possible but here what I'd like to do.
I need to write a stored procedure that takes in a single value (a SKU number). I have 8 tables in my database that all have a column called ItemSKU. I'd like to check all eight tables in one procedure and see if I can find a match to that single SKU number.
Is there a way I can check each table for a match and, if a match is found, stop the search and return the columns (name, price, stock) that I want?