Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 insert problem
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

New Zealand
51 Posts

Posted - 06/14/2006 :  19:23:31  Show Profile
Hi i want to convert rows to columns in my table.
my rows are jan,feb,mar,apr,.....dec
i want to convert them into columns

how shall i do that?????

Constraint Violating Yak Guru

366 Posts

Posted - 06/14/2006 :  20:39:46  Show Profile
Use the CASE statement:

CASE WHEN YourColumn = 'jan' THEN ... END AS [jan],
CASE WHEN YourColumn = 'feb' THEN ... END AS [feb],
Go to Top of Page

Premature Yak Congratulator

22864 Posts

Posted - 06/15/2006 :  03:00:48  Show Profile  Send madhivanan a Yahoo! Message
Read about Cross-tab Reports in sql server help file
Also refer


Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000