?
Solved

help in stored proc

Posted on 2011-02-25
3
Medium Priority
?
315 Views
Last Modified: 2012-05-11

need to rewrite the query adding following formula in the attached procedure


Markup:

(Total bid price- sum of total costs -total base freight)/sum of total costs  *100


here

Total bid price= sum (QI.QuoteItemQuantity * QI.QuoteItem_ItemTotalPrice ) from the select statement.

how to implement this in the attached stored proc



I need to build the reports based on this
reportdetailcost.txt
0
Comment
Question by:sqlcurious
[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
  • 2
3 Comments
 
LVL 41

Expert Comment

by:Sharath
ID: 34984065
Can you post the sample output of your proc and expected additional columns?
0
 

Accepted Solution

by:
sqlcurious earned 0 total points
ID: 34984192
the markup percent is taken directly from the column .Now i want to implement it using procedure similarly for total freight too.

i want additional margin column which has following formula

(total bid price)-(sum of total cost)-(total base freight)/(total bid price)*100

where total base freight=total freight
and sum of total costs=total costs
sample-output-project-detail-cos.txt
0
 

Author Closing Comment

by:sqlcurious
ID: 35308422
no solution
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

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.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

765 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