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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 New queryRequied
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chbala85
Starting Member

49 Posts

Posted - 07/15/2013 :  02:52:15  Show Profile  Reply with Quote

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)

Singapore
17586 Posts

Posted - 07/15/2013 :  03:25:02  Show Profile  Reply with Quote
quick ... check out PIVOT operator . . .


KH
Time is always against us

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 07/15/2013 :  03:50:34  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000