How do i get around this???
View Complete Post
Hi I want do SUM(TABLE1.PARAM1)*(SELECT TABLE2.PARAM FROM TABLE 2 WHERE TABLE2.PARAM3=TABLE.PARAM3
I DID BELLOW CODE BUT GETTING ERROR AS cannot perform aggregate function on expression containing aggregate or subquery
YOUR HELP REALLY APRECIATED
ALTER PROCEDURE ShowcClientvsTimevsCost(@Country nvarchar(15) )
select tTIMESHEET.ACTIVITY , sum(REV_BY_CLIENT.Jan+REV_BY_CLIENT.Feb+REV_BY_CLIENT.Mar+REV_BY_CLIENT.Apr+REV_BY_CLIENT.May+REV_BY_CLIENT.Jun+REV_BY_CLIENT.Jul+REV_BY_CLIENT.Aug+REV_BY_CLIENT.Sep+REV_BY_CLIENT.Oct+REV_BY_CLIENT.Nov+REV_BY_CLIENT.Dec) as
sum(tTIMESHEET.SUN+tTIMESHEET.MON+tTIMESHEET.THU+tTIMESHEET.WED+tTIMESHEET.THU+tTIMESHEET.FRI+tTIMESHEET.SAT)as SUMTIME ,
(SELECT HR_CHARGE FROM tEMPLOYEE t WHERE t.EMP_ID =tTIMESHEET.EMP_ID ) )as SUMTIMECOST
from tTIMESHEET INNER JOIN REV_BY_CLIENT on
tTIMESHEET.ACTIVITY = REV_BY_CLIENT.Client and REV_BY_CLIENT.Country = @Country
group by ACTIVITY
Hi is it possible to write a custom aggregate function in SSIS. Is there any other way to do it better? Any help is highly appreciated.
My values are like this
Item | VALUE
I am trying to bring the output.
Good morning to everybody. I am not understanding why I am getting the following error (also mentioned in the subject line).
I have written the following function in SQL Server 2005:
CREATE FUNCTION dbo.GetCandateID()RETURNS INTASBEGIN declare @candidate_id int SELECT @candidate_id = max(c.candidate_id) from dbo.candidates c if(@candidate_id is null) set @candidate_id = 1001 else set @candidate_id = @candidate_id + 1 return @candidate_idEND
The function compiled properly. I have used the above function like below in the query:
I am getting the following error:
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.GetCandidateID", or the name is ambiguous
i want create a UD Aggregate like Row_Number () for using with 'Over (Order By ...) ' (not like sum() over (part....)
is it possible?
I have an SSAS MDX query that uses a calculated member; when adding the subtotal in the report I would like to rely on SSAS doing to aggregation rather than the incorrect sum SSRS is trying to do. But when I use =Aggregate(Fields!x.Value)
I dont get anything back, the cell is blank.
HI, I have a aggregate function that calculates median in all cases excet if every value that is being passed in is null and I cant seem on how to fix it. I beleive it has to do with either the read or write methods below is the code that I am using and
the error. Any help on this would be greatly appreciated. Thanks in advane.