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
prasanna kumar
NA
41
7.5k
How to calculate Sum of row of each column using MSSQL
Aug 28 2019 5:02 AM
This is my
temp table
and its query and the content.
SELECT EMPID,EMPName,[Note making],[Blind activity],Oral,[Listening skills],Understanding,Creativity,Practical,Application,Computation,
Concept,[Mental Ability],[TotalGr]
into #temptable
FROM
(
SELECT dbo.EMP_Basic_Information.DeptID,
dbo.EMP_Basic_Information.FirstName + ' ' + dbo.EMP_Basic_Information.MiddleName + ' ' + dbo.EMP_Basic_Information.LastName AS EMPName,
dbo.EMP_Basic_Information.Sal, dbo.EMP_Basic_Information.Quality
FROM dbo.EMP_Basic_Information
WHERE (dbo.EMP_Basic_Information.DeptID = 25)
)
as s
PIVOT
(
AVG(Sal)
FOR [Quality] in ([Note making], [Blind activity], Oral,[Listening skills], Understanding, Creativity, Practical, Application, Computation, Concept, [Mental Ability], [TotalGr])
)
AS Pivot_alias
And our requirement is as
Thanks in advance.
Reply
Answers (
4
)
Stored Procedure
How to create a sum value ??