•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 402,672 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,294 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums
Views: 916 | Replies: 0
•
•
Join Date: Feb 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Crystal Report 11 and Visual Basic 6.0 sql query.... (Visual Basic 4 / 5 / 6)
- TopN/Sort Group (VB.NET)
- how to add database fields dynamically to a crystal report in .net 2003 (C#)
- ASP and Data Report (ASP)
- Session maintenance in Crystal Report X1 (ASP)
- Crystal Report Query Engine error (VB.NET)
- Hi,Need help on sql select statement structure (MS SQL)
- SQL does not substract (MS SQL)
- Problems on making Crystal Report (VB.NET)
Other Threads in the MS SQL Forum
- Previous Thread: How do you count number of records in Sql?
- Next Thread: Moving 2 databases over to a new server



Threaded Mode