Quantcast
Channel: Getting started with SQL Server forum
Viewing all articles
Browse latest Browse all 9243

How to Convert normal table to PIVOT table

$
0
0

Hi

i have a table just a 4 column and I need to convert it to PIVOT table. I tried but not working. Please take a look at my table,

MOID                  Attendance                 Date

______               ________                  ______

1                          P                   11/4/2013

1                          A       11/5/2013

1                          A       11/6/2013

2                          P       11/4/2013

2                          A       11/5/2013

2                          P       11/6/2013


I need to convert it as

MOID            11/4/2013             11/5/2013           11/6/2013

_____          _________             _________         _________

1                  P                               A                         A

2                  P                               A                         P

Can anyone help it to solve.

Thanks in advance.

:)





Viewing all articles
Browse latest Browse all 9243

Trending Articles