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
narasiman rao
NA
519
768.5k
convert rows into columns using query
Jan 19 2013 5:24 AM
Date Session Code [Table name Schedule]
1/14/2013 1 CM
1/14/2013 3 CM
From the above i want the output as follows;
1 3 [Session]
1/14/2013 CM CM [Code]
how to get the above output using query in sql server.
how can i do.please help me.
i tried the below query it is not working showing error as Incorrect syntax near '1'.
SELECT
Date,1,3
FROM
Schedule
PIVOT (MAX([Code]) FOR Session IN (1,3)) P
how can i get the correct output using query tell me.please reply the answer.
Reply
Answers (
1
)
Bind Textbox to specific column of a datatable
How to open the Excel(.xlsx) file embeded in Windowforms con