Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-03-15
1
Medium Priority
?
323 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:thenthorn1010
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 35

Accepted Solution

by:
James0628 earned 2000 total points
ID: 35146440
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.

 James
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question