Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    24

    Question Unanswered: selecting multiple 'where's

    Is there a quicker way to add several quirky numbers into a SELECT statement than going..

    SELECT ProductID FROM Products WHERE productCat = 1 OR productCat = 3 OR productCat = 4 OR productCat = 5;

    Now I'm just typing that off the top of my head, I've already changed the code to something else, but I'd really like to back to that one and perfect it.

    Thoughts?

  2. #2
    Join Date
    Feb 2002
    Location
    Sweden
    Posts
    34
    Try "SELECT ProductID FROM Products WHERE productCat IN(1,3,4,5);
    - Jonte

  3. #3
    Join Date
    Oct 2002
    Posts
    24
    Thanks Jonte, I'll give that a shot!

Posting Permissions

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