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
Riddhi Valecha
422
3.3k
415.5k
Dynamic Columns in SQL Query
Dec 11 2013 12:33 AM
Hi all.. I need help in forming a SQL Query.
My requirement is - I have the table as follows-
ID
Date
Status
Count
Company
Location
1
1-1-2010
Clear
1
D
E
2
2-3-2010
Clear
2
C
F
3
1-1-2010
Rejected
3
B
G
4
2-3-2010
Rejected
4
A
H
Now, I want the output as follows in the sql query -
ID
Date
Jan-2010Clear
Jan-2010Rejected
Feb-20101Clear
Feb-2010 Rejected
Total
1
1
3
2
4
10
2
3
Total
1
3
2
4
10
I am not able to create dynamic columns in query.
Please Help..
Thanks a lot in advance....
Reply
Answers (
22
)
want add webgrid and some submit button in same file in MVC3
value of Html.RadioButtonFor in MVC