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.
| Author |
Topic |
|
ck.keerthi
Starting Member
3 Posts |
Posted - 2009-09-03 : 10:09:49
|
| Hi all,I have a table like this ..Project Date Hours----- ---- -----A 1 8A 2 8B 3 8C 4 8D 5 8If table is queried , I need like ..Date 1 2 3 4 5Project A B C D EHours 8 8 8 8 8Can anyone help me on this issue ? or if you find any link explaining what i need kindly post asap ..!Keerthi C |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-09-03 : 10:12:43
|
| If it is SQL 2005 or above, use PIVOT, if it is SQL 2000, then you will need to use temp tables as far as I remember. |
 |
|
|
ck.keerthi
Starting Member
3 Posts |
Posted - 2009-09-03 : 10:23:08
|
| Hi RickD,Thank you for quick response. I am working on sql 2005 . if you have any sample queries can you post it ?It will be helpful for me as well as future people who refer this forums :)Thanks,Expecting sample query ,Keerthi CKeerthi C |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-09-03 : 10:37:00
|
| Why not look at Books Online, there are examples in there?http://msdn.microsoft.com/en-us/library/ms177410.aspx |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-09-03 : 10:37:08
|
| If you search the forums for PIVOT, you will see many examples of how to use it.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
ck.keerthi
Starting Member
3 Posts |
|
|
|
|
|