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 |
|
TSQLMan
Posting Yak Master
160 Posts |
Posted - 2008-01-05 : 11:11:08
|
I have a project where I need to turn row data into column data. The table is like the following:Support ReadDate Pressure ValueRS1 1/5/2008 456RS2 1/5/2008 237RS3 1/5/2008 455RS1 1/4/2008 427RS2 1/4/2008 345RS3 1/4/2008 426............. I want to make support the columns, and ReadDate the Rows. There are 130+ Supports in total. I need a way to select each support for a distinct date into a series of column data. Also if anyone knows of any articles on this topic, I would appreciate the information. Thanks, |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-05 : 11:52:50
|
| Try using PIVOT operator. Refer to BOL for syntax.You can make use of PIVOT in dynamic SQL if the column values are not certain. |
 |
|
|
TSQLMan
Posting Yak Master
160 Posts |
Posted - 2008-01-05 : 11:55:23
|
quote: Originally posted by visakh16 Try using PIVOT operator. Refer to BOL for syntax.You can make use of PIVOT in dynamic SQL if the column values are not certain.
I will look at this, Thanks |
 |
|
|
|
|
|