G
Guest
Any suggestions on query / interface design for a multiple variable where
clause query.
That is
SELECT * FROM CUSTOMER WHERE SERVICE_PROVIDED = "a number of variables could
go in here".
Now I am aware of a many to many relationship here but have tried to
simplify the question. I have multiple types of SERVICE_PROVIDED and want the
user to be able to type (preferrably select) one or more and the query to
run. The SERVICE_PROVIDED is not static therefore check boxes or similar I
suppose wont do.
An example query for explanatory purposes is (ingoring syntax errors) :
SELECT * FROM CUSTOMER WHERE SERVICE_PROVIDED = "Disability" OR
SERVICE_PROVIDED = "Aged" OR SERVICE_PROVIDED = "Youth training"
I would assume something like a multiple selection list or combo box that
populates with a query from the source table, and then somehow uses a loop to
populate the where clause of the query. I have never done somehting like this
before but always required it. I am sure you smart people have done this
many times before and would appreciate your advice. Any suggestions would be
appreciated.
Thanks in advance.
clause query.
That is
SELECT * FROM CUSTOMER WHERE SERVICE_PROVIDED = "a number of variables could
go in here".
Now I am aware of a many to many relationship here but have tried to
simplify the question. I have multiple types of SERVICE_PROVIDED and want the
user to be able to type (preferrably select) one or more and the query to
run. The SERVICE_PROVIDED is not static therefore check boxes or similar I
suppose wont do.
An example query for explanatory purposes is (ingoring syntax errors) :
SELECT * FROM CUSTOMER WHERE SERVICE_PROVIDED = "Disability" OR
SERVICE_PROVIDED = "Aged" OR SERVICE_PROVIDED = "Youth training"
I would assume something like a multiple selection list or combo box that
populates with a query from the source table, and then somehow uses a loop to
populate the where clause of the query. I have never done somehting like this
before but always required it. I am sure you smart people have done this
many times before and would appreciate your advice. Any suggestions would be
appreciated.
Thanks in advance.