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 |
|
Grifter
Constraint Violating Yak Guru
274 Posts |
Posted - 2011-03-02 : 06:10:25
|
HiI have a simple result set that I would like to put into a column display and have been reading about pivot table but not sure if this is what I need. I have the following:columnA ColumnB======= =======A YesB YesC NoD Yes and want it to display like this:A B C D=== === === ===Yes Yes No Yes Anything that anyone can suggest?ThanksGrifter |
|
|
Grifter
Constraint Violating Yak Guru
274 Posts |
Posted - 2011-03-02 : 06:57:19
|
I have used this, whcih returns what I want but am now wondering whether I can include this in my query. the problem is I need to include the fields in a report and so need each field like A, B, C, D to pull into a grid display in a reportselect MAX(Case WHEN columnA = 'Yes' THEN ColumnB END) AS 'A' |
 |
|
|
|
|
|