472,779 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Creating a summary table for a yes/no page vote

Hi, Im trying to create a summary page for a vote on pages in ASP.Net and having trouble writing the SQL to do this.

Each page has a "was this helpfull YES or NO" which when an option is chosen the result saved into a database table along with a numerical ID for the page and the section of the site that the page is in.

On the summary page it needs to add up all the yes votes and no votes and tally them up next to there page in each section.

Thank you
Nov 23 '07 #1
2 1102
663 Expert 512MB
Are you saving the selection as a bit field or a char field in your database table?

Nov 23 '07 #2
All the variables are saved as numbers, so each area and page has a number reference and the votes are saved as a number variable as well 1 for yes and 0 for no.

Something like this;

Area Page Vote
1 1 1
1 2 1
4 1 0
2 2 0
2 2 0
1 1 1
3 3 1
4 1 0

In the summary this would be counted and sorted like bellow

Area Page Yes No
1 1 2 0
1 2 1 0
2 2 0 2
3 3 1 0
4 1 0 2
Nov 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Andrew Westgarth | last post by:
Hi all, i'm struggling with a page idea I have. I need to write a page with an A to Z list of available schools in the area. I only want to display the letters in the A to Z which have school...
by: msnews.microsoft.com | last post by:
Hello All, I created a control and it is not showing up in my Web Page? I am new to this. Can somebody please explain what I am doing wrong. Thanks Anand Ganesh Here is my control code....
by: Brian Cryer | last post by:
I posted this question recently to microsoft.public.dotnet.languages.vb but didn't get any answer. I'm hoping that someone here will be able to help me. I'm working on a project using VB.NET...
by: rodchar | last post by:
hey all, i was wondering how you would do this. i have a webform with a summary page on it. The summary page tells you the followng: # of Employees Unchanged # of Employees Underwriting #...
by: Nathan Benefield | last post by:
I currently have a spreadsheet tracking votes on legislation in a matrix type format. It is something like this Name Act1 Veto1 Act1A Jones yes No Yes Johnson Yes ...
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
by: kret | last post by:
Hi, this is my first post so first of all I would like to say hello :) Now getting to my problem. In my job I have to create an ActiveX control in .NET 1.1 that can be lunched from IE....
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.