Solved

help in stored proc

Posted on 2011-02-25
3
308 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
  • 2
3 Comments
 
LVL 40

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 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