Sivakumar

Sivakumar

  • NA
  • 551
  • 210.8k

stored procedure returns Null value

Sep 4 2015 12:42 AM
Hi,
 
This is My storedprocedure :
 
GO
ALTER PROCEDURE [dbo].[uspGetVote](@TeamID INT,@CardID INT)

AS

BEGIN


SELECT AVG(VoteValue) AS [AverageVoteValue] FROM Vote
WHERE TeamID=@TeamID and CardID=@CardID and LastModifiedDateTime between getDate()-7 and getDate()
end 
 
When execute this procedure returns Null.
 This is my table values :
 
 
 
When i pass TeamID and CardID 1,1 its shows a Null.
 
Please give a correct query for that.
Thank You.

Answers (3)