Solved

help in stored proc

Posted on 2011-02-25
3
306 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
Comment Utility
Can you post the sample output of your proc and expected additional columns?
0
 

Accepted Solution

by:
sqlcurious earned 0 total points
Comment Utility
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
Comment Utility
no solution
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 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

14 Experts available now in Live!

Get 1:1 Help Now