Viewing 15 posts - 91 through 105 (of 259 total)
In the #ActivitySummary there is a sort column ActivitySort which puts them in the appropriate Order so but how do I get the #Activity table joined sinced there is not...
March 21, 2008 at 8:48 am
I am not sure that gets me to where I want to be.
This almost gets me to where I want to be:
GO
Declare @MonthsOut int, @StartDate datetime, @EndDate datetime, @COnsultantID char(20)
Set...
March 21, 2008 at 8:14 am
Thanks for that It gave me an idea on how to pull the totals I am looking for but now I need to join in my temp table #ActivitySummary:
DECLARE @consultantID...
March 21, 2008 at 6:51 am
With a some research into a solution what I think i need is a crosstab query. I started on some code but need some assistance:
DECLARE @consultantID VARCHAR(20)
DECLARE @StartDt DateTime
DECLARE...
March 20, 2008 at 9:07 am
Maybe this needs to be a new thread. Rules have changed and now I need to create a matrix so I thank everybody for their help. I did get the...
March 20, 2008 at 7:00 am
But if I use the union statem to append my temp table that has only periodenddates won't that just add all the the periodenddated from the temp table regardless if...
March 19, 2008 at 4:38 pm
Well this is sort on the same lines:
I have the following recordset:
ConsultantID Mthly1stLinePORSales ...
March 19, 2008 at 3:51 pm
You were right. I took out the PeriodEndDate and it summed correctly.
March 19, 2008 at 12:18 pm
I tried to remove the periodenddate from the GROUP By but I get this error:
Msg 8120, Level 16, State 1, Line 163
Column 'Volume.PeriodEndDate' is invalid in the select list because...
March 19, 2008 at 12:08 pm
This is the solution iI implemented:
,Ord.ShipToFirstName + ' ' +Ord.ShipToLastName AS ShipToName
,ISNULL(Ord.ShippingTotal,0)
,ISNULL(Ord.OrderTotal,0)
,ISNULL(Ord.TaxTotal,0)
FROM(SELECTDISTINCT con.[ConsultantID]
,Con.FirstName + ' ' + Con.LastName AS ConsultantName
,List.ListType
FROM[Consultant] AS Con With (NoLock)
,(SELECT DISTINCT ListType FROM [SharedDimension].dbo.[DimListingType] With...
March 19, 2008 at 11:57 am
Simple is best I used this route:
,CASE
WHEN v.PurchaseAmount/15000 <=1 THEN 0
ELSE v.PurchaseAmount/15000
END as 'TotalPersonalSalesCalculatedPoints'
March 18, 2008 at 3:58 pm
Revisiting the spec it is any thing less than 1 (whole Number) that they want to see a 0.
March 18, 2008 at 3:38 pm
I think the issue resolved it self when perople reminded me that 0.23220 is not equivlent to 0.
THis is my solution:
,CASE
WHEN v.PurchaseAmount/15000 <=1 THEN 0
ELSE v.PurchaseAmount/15000
END as 'TotalPersonalSalesCalculatedPoints'
March 18, 2008 at 3:23 pm
Yes it worked. Kinda of hard to read the output.
0000344 37127.3341821.8629992.62129.65108941.812007-11-30 00:00:00.000
0000344 25964.2330203.9325797.920.0081966.082007-12-31 00:00:00.000
0000344 14517.5418325.423914.60106.8436757.562008-01-31...
March 18, 2008 at 3:12 pm
Viewing 15 posts - 91 through 105 (of 259 total)