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 |
adnanc
Starting Member
3 Posts |
Posted - 2007-02-20 : 05:10:08
|
Hello All,Apologies if this is the wrong forum section.Some help and advice please regarding a SQL Report.It is for a Feedback form and below is a quick mock up of the DB diagramtblFeedback is populated with a Customers details and the tblResults with the Results of each question they answered.When I'm currently running a report the data is displayed thus:|_Name___|_Email____________|_Comments_______|_Question______________|_Response_|Bob Joe--- bobjoe@email.com --- Great Service ----- Would you come again ---- YesBob Joe--- bobjoe@email.com --- Great Service ----- Would you recommend ---- YesBob Joe--- bobjoe@email.com --- Great Service ----- Would you buy from us ---- YesEach row corresponds to one question and a lot of data is duplicated, it detracts from the important information.What I would prefer is something like the following:|_Name___|_Email____________|_Comments________|_Q1__|_Q2__|_Q3_|_Q4___|_Q5_|_Q6__|_Q7___|Bob Joe--- bobjoe@email.com --- Great Service ------- Yes -- Yes -- No -- Maybe - No -- Yes -- MaybeAfter reading a number of resources, I think a pivot table may help, this will turn the data in tblResults from rows into columns and I should be able to append this via a temporary table.Any brave forummer willing to look into this problem?Many Thanks |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
adnanc
Starting Member
3 Posts |
Posted - 2007-02-20 : 05:40:15
|
Apologies for the cross post, wasn't too sure which forum this question was most suited to.Could you give some constructive help please? |
|
|
|
|
|