TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sivakumar
NA
551
219.5k
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.
Reply
Answers (
3
)
sql query Negative values assign 0 in case using
Stored procedure Syntax error