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.
Author |
Topic |
baska123
Yak Posting Veteran
64 Posts |
Posted - 2006-11-15 : 16:28:08
|
I have the following statementSET @BEFor_Year = (Select isnull(sum(isnull(Amount,0)),0) from BILLING_TIME_COSTSwhere msps_proj_id=@Proj_IDand month_abbrev=@MONTH_ABBREV and BILLABLE='1') and I want to add the following Amount (which already exists) * PercentageHow 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_COSTSwhere msps_proj_id=@Proj_IDand month_abbrev=@MONTH_ABBREV and BILLABLE='1') SET @BEFor_Year = @BEFor_Year * yourPercentageGo with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|