I have a stored procedure that calculates part pricing, list prices, price multiples etc.
Within that stored procedure I have several declares and set statements (populated by selects from parameter tables) that are used to determine how a part is priced.
Currently when the stored procedure is called I pass the part number and customer number which are critical to how the declared values are used.
This is a SPROC that I want to be able to incorporate in TSQL whenever I need to calculate the correct part pricing.
I'm trying to figure out how I can call the Pricing stored procedure and use the result set from the call.
I've contemplated turning the pricing procedure into a table-valued function but It would require declares and sets which I believe cannot be done in a table-valued function.