Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,

I have a table like this,


pin subcode avg_marks

1 301 20

1 302 19

1 303 18

1 304 09

1 305 15

1 306 12

1 307 18

1 308 20

1 309 17

1 310 16

1 311 11


Now I want to have table as


pin 301 302 303 304 305 306 307 308 309 310 311

1 20 19 18 09 15 12 18 20 17 16 11


i tried to do this using pivot table. I can't do it. I am using sql server 2000.

Please help me.......
Posted
Comments
Sergey Alexandrovich Kryukov 29-Mar-13 17:28pm    
Please stop posting non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA

1 solution

SQL server 2000 does not support Pivot. You need to use 2005 or higher and also set the DB compatibility level to 90 or higher.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900