If I understand correctly, you're worried about the different
combinations of sql querries based on different choices from the choice
boxex.  Without knowing the database structure and the example querries
it's difficult to say but nevertheless...

The way I would approach it is to construct a do-all querry as a
prepared statement with all possible 'where' clauses.  After receiving
the data from the form populate the '?' that you get.  For the 'where'
clauses that you have no data put * to get all (I don't know if this works).

If the above is impossible then try to have the SQL query ready to have
appended the 'where' clauses to it when you have parameters for them:

if (raceParameter != null)
        sql += " where race = '"+raceParameter+"'";
...

d.

Tom Kochanowicz wrote:
> Yes,
>
>         What I am doing is setting up a web enabled data warehouse to study
> pancreatic cancer patients. The mission is to find characteristics that are
> common in these patients and to see if their is a pattern (e.g. sex, race,
> demographics, etc.) that shows a higher probability of getting pancreatic
> cancer. Each choice box has an entity, for example race, which has
> attributes or characteristics, for example Asian, black, white etc.
>
>>From a functional perspective, you could say I am counting based on a query
> and determining an average...or the probability of having pancreatic cancer
> if you have certain attributes or your life style follows certain
> characteristic.
>
> I already have a working model which gets a single value from each choice
> box, but want the user to be able to combine selections that are in the same
> choice box, for example, if their is a choice box that has life style and
> the attributes may contain "drink alcohol", "smoke", "program in java" (ha
> ha), I want to be able to have the user do a query of the database that
> returns a count/probability.
>
> By the way the count/probability part is already figured out, it's just
> getting the numerous different parameters to form an sql query without
> having to write a ton of code.
>
> Sincerely,
>
> Tom Kochanowicz
>
>
>
>
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Bhushan_Bhangale
> Sent: Friday, May 10, 2002 1:37 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Using the getParameterValues
>
>
> It depends what kind of query you want to write and the table structure.
> Could you elaborate more abt the functionality?
>
> -----Original Message-----
> From: Tom Kochanowicz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 10, 2002 12:05 PM
> To: [EMAIL PROTECTED]
> Subject: Using the getParameterValues
>
>
>         I am working with multiple choice boxes on an html page. I want the
> user to
> be able to do multiple choices, per choice box so the number of parameters
> will vary depending on what the user selects from each of 6 different choice
> boxs.
>
> - From these selections I want to use the values I get from each
> getParameterValues() to build a sql query. The problem is their are 6 choice
> boxes with up to 10 different values.
>
> - Is their a practical way to do this without having to build a hugh number
> of different combinations of query strings???
>
>
> Sincerely,
>
> Tom Kochanowicz
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
>



--
David Mossakowski              [EMAIL PROTECTED]
Instinet Corporation                 212.310.7275



*******************************************************************************
<<Disclaimer>>

This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and/or
CONFIDENTIAL or both.

This email is intended only for the personal and confidential use
of the recipient(s) named above.

If the reader of this email is not an intended recipient, you have
received this email in error and any review, dissemination,
distribution or copying is strictly prohibited.

If you have received this email in error, please notify the sender
immediately by return mail and permanently deleting the copy
you received.

Thank you.

*******************************************************************************

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to