Query with a string

Results 1 to 3 of 3

Thread: Query with a string

  1. #1
    biker Guest

    Default Query with a string

    I am passing several variable from a form. The number of variables passed could run from 1 to 14. I need to run a select query using those variables to search a field in a database in order to obtain recordsets based on those members of the site (and only those) that have those exact passed values. And&#039s will not work as if one of the 14 possibilities is false, the whole thing is false. Or&#039s will not work as if one is true for several of the member but the rest of the variable are not true, the recordsets produces will still reflect all members where the one value is true.<BR><BR>My questions is, is there a way to use a comma delimited string to query a table. If not, how would one accomplish that which I am attempting to do?

  2. #2
    Join Date
    Dec 1969

    Default RE: Query with a string

    Is it just one field you are checking? You can do something like this:<BR><BR>SELECT * FROM TABLE WHERE FIELD IN (&#039value1&#039, &#039value2&#039, &#039value3&#039)<BR><BR>Good luck!

  3. #3
    biker Guest

    Default RE: Query with a string

    Thanks, I will try that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts