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
312 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
1 Comment
 
LVL 34

Accepted Solution

by:
James0628 earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now