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
319 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 500 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

729 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