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 |
|
krish001
Yak Posting Veteran
61 Posts |
Posted - 2009-10-22 : 06:44:48
|
| BEGINIF @TeamMember = 'e2eACD21-F783-484D-915B-01EF661F5E3B'BEGINselect [BU],ResourceName as TeamMember, sum(capacity)as capacity,sum(AssignmentBaseline0Work) as Planned,(sum(AssignmentBaseline0Work)/sum(capacity*200))*100 as PerUtilizationfrom MSP_EPMPROJECT_USERVIEW P,MSP_EPMRESOURCE_USERVIEW R, MSP_EPMASSIGNMENT_USERVIEW A,MSP_EpmResourceByDay_UserView DWHERE P.PROJECTUID= A.PROJECTUID AND A.RESOURCEUID= R.RESOURCEUID and R.RESOURCEUID= D.RESOURCEUIDand ResourceName =@TeamMember and ProjectStartDate>= @FromDate and ProjectFinishdate<= @ToDate and R.RESOURCEUID in (@TeamMember)--and date between FromDate= @FromDate and ToDate= @ToDateGROUP BY [BU], ResourceNameENDIF @TeamMember <> 'e2eACD21-F783-484D-915B-01EF661F5E3B'BEGINselect [BU], ResourceName as TeamMember, sum(capacity)as capacity,sum(AssignmentBaseline0Work) as Planned,(sum(AssignmentBaseline0Work)/sum(capacity*200))*100 as PerUtilizationfrom MSP_EPMPROJECT_USERVIEW P,MSP_EPMRESOURCE_USERVIEW R, MSP_EPMASSIGNMENT_USERVIEW A,MSP_EpmResourceByDay_UserView DWHERE P.PROJECTUID= A.PROJECTUID AND A.RESOURCEUID= R.RESOURCEUID and R.RESOURCEUID= D.RESOURCEUIDand ResourceName =@TeamMember and ProjectStartDate>= @FromDate and ProjectFinishdate<= @ToDate ---and RESOURCENAME in (@TeamMember)--and date between FromDate= @FromDate and ToDate= @ToDateGROUP BY [BU], ResourceNameENDENDby this query iam getting allocation when it is not overall but when i run it for overall it is showing nothing???? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-22 : 07:03:30
|
| What do you mean by overall?MadhivananFailing to plan is Planning to fail |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-10-22 : 07:03:33
|
What is the value of @TeamMember when it is not 'e2eACD21-F783-484D-915B-01EF661F5E3B'? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-10-22 : 09:15:11
|
Funny - no response...must be very urgent! No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|
|
|