Advertisement
Advertisement
| 07.30.2008 at 07:32AM PDT, ID: 23607476 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: |
Declare @StartDate datetime
Declare @StopDate datetime
Set @StartDate = DateAdd(year,0,GetDate())
Set @StartDate = '01/01/' + cast(Year(@StartDate) as varchar(4))
Set @StopDate = GetDate()
Set @StopDate = Cast(Month(@StopDate) as varchar(2)) + '/01/' + cast(Year(@StopDate) as varchar(4))
SELECT rpt_AllianceRevenue.CN_Description AS Customer, rpt_AllianceRevenue.AC_CustomerNo AS [Customer No], SUM(rpt_AllianceRevenue.SumOfRevenue)
AS Revenue,
(Select Sum(Rl_NetExtension)
From hcisdata..ARLine
inner join hcisdata..ARheader on hcisdata..ARHeader.Rh_ID = hcisdata..ARLine.Rl_ARHeaderID
inner join rpt_AllianceRevenue on AC_CustomerNo = Rh_CustomerNoWork
WHERE (rpt_AllianceRevenue.[Date] >= @StartDate) AND (rpt_AllianceRevenue.[Date] <= @StopDate)
) AS Total_Rev, YEAR(rpt_AllianceRevenue.[Date]) AS Year,
HCISData..Customer.Cu_City + ', ' + HCISData..Customer.Cu_State AS Site, HCISData..Customer.Cu_City,
HCISData..Customer.Cu_State
FROM rpt_AllianceRevenue INNER JOIN
HCISData..Customer ON rpt_AllianceRevenue.AC_CustomerNo = HCISData..Customer.Cu_CustomerNo
WHERE (rpt_AllianceRevenue.[Date] >= @StartDate) AND (rpt_AllianceRevenue.[Date] <= @StopDate)
GROUP BY rpt_AllianceRevenue.CN_Description, rpt_AllianceRevenue.AC_CustomerNo, HCISData..Customer.Cu_City, HCISData..Customer.Cu_State,
YEAR(rpt_AllianceRevenue.[Date])
ORDER BY rpt_AllianceRevenue.CN_Description
|