| View previous topic :: View next topic |
| Author |
Message |
Steve Warburton Guest
|
Posted: Mon May 24, 2004 4:10 pm Post subject: Number of 1's in a field. |
|
|
I need to achieve the following and wonder if any of you have any ideas on
the best approach.
We will recieve market research data that will be in the format.
Question 1.(relavent question eg are you happy with our service?)
Answers
1. always 2.never 3.sometimes 4.dontknow etc etc upto 6 fields.
Question2. etc etc upto Question 15.
The answer can only be a tick in a one box for each question.
This information will be emailed to the client in the format.
DataCollector_ID.
Date.
Time.
Question1.(3)
Question2.(2) etc where the number is the box that was ticked.
This would build up a table containing all the answers to all the questions.
How do I search through the data to find out how many of question1 were
answered 1 then 2 then 3 and the same with question2 etc.
Once I have these should I create another table and post the results into
the new table.
I could then show in reports what the totals of each question's answers
were.
Many thanks in advance.
SteveW
|
|
| Back to top |
|
 |
Uncle Potato Guest
|
Posted: Tue May 25, 2004 7:05 am Post subject: Re: Number of 1's in a field. |
|
|
On Mon, 24 May 2004 17:10:33 +0100, "Steve Warburton" <SteveNospam>
wrote:
| Quote: | We will recieve market research data that will be in the format.
Question 1.(relavent question eg are you happy with our service?)
Answers
1. always 2.never 3.sometimes 4.dontknow etc etc upto 6 fields.
This would build up a table containing all the answers to all the questions.
|
You may build your table as
ID Q1 Q2 Q3 .. Q15
001 1 2 1
002 2 1 3
or
ID Q A
001 1 1
001 2 2
001 3 1
002 1 2
002 2 1
002 3 3
| Quote: | How do I search through the data to find out how many of question1 were
answered 1 then 2 then 3 and the same with question2 etc.
|
Then you can use a simple SQL statement to find out the count for
Question 1 having ans=1
SELECT Count(*) from Table1 where Q1=1
or
SELECT count(*) from Table2 where q=1 and A=1
|
|
| Back to top |
|
 |
|