Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Add multiplication

Author  Topic 

baska123
Yak Posting Veteran

64 Posts

Posted - 2006-11-15 : 16:28:08
I have the following statement

SET @BEFor_Year = (Select isnull(sum(isnull(Amount,0)),0) from BILLING_TIME_COSTS
where msps_proj_id=@Proj_ID
and month_abbrev=@MONTH_ABBREV and BILLABLE='1')


and I want to add the following
Amount (which already exists) * Percentage
How do I change the statement??

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-15 : 16:39:43
SET @BEFor_Year = (Select isnull(sum(isnull(Amount,0)),0) from BILLING_TIME_COSTS
where msps_proj_id=@Proj_ID
and month_abbrev=@MONTH_ABBREV and BILLABLE='1')

SET @BEFor_Year = @BEFor_Year * yourPercentage



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -