Results 1 to 2 of 2

Thread: Multiple Searches?

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2009
    Posts
    62

    Multiple Searches?

    Hi folks,

    I can't seem to wrap my head around this concept. I need someone to please give me some guidance.

    I am using VS2010 / SQL2005 - ASP.NET VB

    Lets say my table looks like the following

    Fileds: Shirt_Type / Shirt_Color / Pants_Type / Pants_Color
    Data: Long Sleeve / Blue / Jeans / Blue
    Data: Short Sleeve / Green / Jeans / Red
    Data: Short Sleeve / Yellow / Dress / Black


    I am trying to perform a search based off any value.

    for example lets say my search form is as follows:

    Shirt Type: Long Sleeve
    Shirt Color: Green
    Pants Type: Jeans
    Pants Color: Black

    obviously a standard search would return nothing because there is not a data row that matches all these items. How can I do a search that would return every row containing Long Sleeve, Green Colors, Jeans and Black?

    Please help!

    Thanks,

    Aaron

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Multiple Searches?

    I presume your "standard search" uses the AND operator to join the conditions, in which case simply use OR instead.

Posting Permissions

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



Click Here to Expand Forum to Full Width