4
Answers

SQL Query Design functionality

David Smith

David Smith

14y
6.7k
1
I want to get opinions before I start design or functionality my query filters:

Lets Say :

I have one report with several fields:


I want to do all of these querie via the report, keep in mind  each field is coming from a drop down box, so the filters are going to be base off of the selected item from any particular dropbox, also keep in mind the drop box only has values that exists no matter what

drowDownbox 1    = A  values           drowDownbox 2    = A  values               
drowDownbox 3    = C  values          drowDownbox 4    = E  values

Select  A, B, C, D, E, F
From   Table1
Where (A = ?) And (B = ?)

Select  A, B, C, D, E, F
From   Table1
Where (A = ?) And (B = ?)

Select  A, B, C, D, E, F
From   Table1
Where (A = ?) And (B = ?)

Select  A, B, C, D, E, F
From   Table1
Where (A = ?) And (B = ?) AND (E = ?)

Select  A, B, C, D, E, F
From   Table1
Where (A = ?) And (C = 'FAIL') AND (E = 'PASS')


etc..........................


Answers (4)