• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • Last Modified:

What is the Logic/Formula for Calculating the "Unit Price" for An Item From the Two Given SQL Server Stored Procedures

Could someone help me figure out what the logic is being used in these two attached stored procedures that calculate the "Unit Price"? I have been tracing back and forth through both of them for hours, and I cannot make heads or tales of what is being computed. If someone could explain to me how the information that is being passed to the stored procedures is used to calculate the "Unit Price", that would be exactly what I cannot figure out on my own. Any help would be greatly appreciated. (Note: As far as I can tell from reading the code, the spsaISOITEM stored procedure calls the spsoGetOrderPrice stored procedure. The end result of knowing this calculation will be a function that will be written in VB . NET 2010. If the stored procedure does need to be callled, please explain how to do this as this SQL code does not make much sense to me after reading through it.) spsaISOITEM.sql  spsoGetOrderPrice.sql
1 Solution
I haven't tried to analyze this in detail, but spsaISOITEM executes spsoGetOrderPrice, and then spsoGetOrderPrice executes several other stored procedures.  I think you probably need to look at those.  spsoGetOrderPrice_Standard seems like the place to start.

 spsaISOITEM also gets a UnitPrice column from a function named dbo.fnimCalcItemNetCost, so that might also be worth a look.


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now