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.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 how to do with many filters

Author  Topic 

tngtng
Starting Member

7 Posts

Posted - 2010-03-18 : 11:20:31
Hi,

I’d like to explore a survey result with filters. My result table is like this:
Answer Question1 Q2 Q3 … Qi Qn
Person 1 1 0 2 …
P2 2 2 3 …

Pm
With accompanied tables :
Q1
N° answer Answser
0 Without Opinion
1 Yes
2 No
Q2
N° answer Answser
0 <20 years old
1 20-30 years old
2 30-40 years old
3 40-50 years old
4 50-60 years old
5 >60 years old

Qn
N° answer Answser
0 Without Opinion
1 <15 mn
2 15-30mn
3 30-45 mn

Exploiter can choose one or many filters in no order & see the result. I don’t have any idea about how to do (overview, organization, etc.) & how to write sql request, something like:
Foreach Q2.reference
Select count(*) from (for each Q1)
The pb is I don’t see any relationship between tables. Please help me! Thanks in advance
   

- Advertisement -