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
 General SQL Server Forums
 New to SQL Server Programming
 New queryRequied

Author  Topic 

chbala85
Starting Member

49 Posts

Posted - 2013-07-15 : 02:52:15

Hi,
help very urgent .......very very urgent.

i have data below:

table_name col_count date_col

t1 20 10/11/13
t2 21 10/11/13
t1 25 10/12/13
t2 27 10/12/13

I need to display like:

table_name 10/11/13 10/12/13
t1 20 25
t2 21 27




please help it's urgent.


Thanks,

krsh


khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-07-15 : 03:25:02
quick ... check out PIVOT operator . . .


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

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-15 : 03:50:34
here's an illustration
http://beyondrelational.com/modules/2/blogs/70/posts/10840/dynamic-pivot-in-sql-server-2005.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -