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

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Data in a different format

Author  Topic 

shiyam198
Yak Posting Veteran

94 Posts

Posted - 2010-03-31 : 22:31:12
Hi,

Can any one ansewr this question.

The data in this format in a SQL table.
http://img98.imageshack.us/img98/7982/table01.png

What is the simplest way to show/present the same data in this format?
http://img94.imageshack.us/img94/2552/table02.png

Sounds simple. But i have been working on this for more than an hour with no joy. :(

Thanks for your time.

- SHM

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-31 : 22:48:24
check out PIVOT in the books online


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-04-01 : 06:30:36
http://beyondrelational.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

shiyam198
Yak Posting Veteran

94 Posts

Posted - 2010-04-01 : 11:42:49
Thanks Guys.
Madhivanan,
I added your blog to my favorites.

Thanks,
Shiyam
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-04-02 : 02:11:58
quote:
Originally posted by shiyam198

Thanks Guys.
Madhivanan,
I added your blog to my favorites.

Thanks,
Shiyam


Thanks and You are welcome

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -