SQL Report Help

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2007
Posts: 1
Reputation: adnanc is an unknown quantity at this point 
Solved Threads: 0
adnanc adnanc is offline Offline
Newbie Poster

SQL Report Help

 
0
  #1
Feb 20th, 2007
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 diagram

http://img219.imageshack.us/img219/4102/feedbackbr8.jpg

tblFeedback 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 ---- Yes
Bob Joe--- bobjoe@email.com --- Great Service ----- Would you recommend ---- Yes
Bob Joe--- bobjoe@email.com --- Great Service ----- Would you buy from us ---- Yes

Each 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 -- Maybe

After 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? http://www.sql-server-performance.co...icon_smile.gif

Many Thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC