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
siva nathan
942
828
231.2k
how to select Empty column in pivot for display row_no
Apr 11 2017 7:04 AM
how to select Empty column in pivot
im using pivot in my sql server to display rows as columns in a report,i want to select empty column in my sql pivot
empid
name
1
2
3
1
a
X
X
L
2
b
X
CL
X
it is possible to select like this
my expected answer is to select row no in sql pivot column
add a new column for s.no
SET @query='SELECT Empid,EmployeeName,Department,'+@cols+' from
(select Empid,EmployeeName,department,day(Attdate)[dtDay],present from temp1 ) x
pivot
(
Max(present)
for dtDay in ('+@cols+'
)) p'
EXECUTE (@query);
i cant add a new column in my pivot table
s.no
empid
name
1
2
Totaldays
1
1
a
X
X
2
2
2
b
X
CL
1
Reply
Answers (
1
)
how to display a duplicated word from a textbox to other
How to learn the logic