Consulting

Results 1 to 7 of 7

Thread: SQL - LIKE function pull many item

  1. #1

    SQL - LIKE function pull many item

    Hi all,

    Can anyone let me know how to pull many item use LIKE % function?
    Please refer my attachment. Thanks

  2. #2
    Use the AND and OR comparison operators:

    Like blah AND Like blahblah OR Like Blahblahblah

    HTH
    Matt
    Matt Jones
    MS Access Certified Professional 2K/2003

  3. #3
    Hi,

    Could you please explain, i not understand. Thanks

  4. #4
    Example:

    SELECT "*" FROM Table WHERE Table.Column1 = 1 OR Table.Column1 = 2

    SELECT "*" FROM Table WHERE Table.Column1 = 1 AND Table.Column2 = 2
    Matt Jones
    MS Access Certified Professional 2K/2003

  5. #5
    Hi,

    If i put "OR" , "AND" is it LIKE function can pull 2 or more number than that, at the same time. As i know "LIKE only can pull 1 number right?

    For example:

    SELECT*
    FROM TABLE1
    WHERE COLUMNA LIKE '%A%' or '%B%'

    Is it the example correct if i want to pull 2 item number at the same time

  6. #6
    I really don't understand your question, so here are some more examples:
    SELECT "*" FROM Table WHERE Table.Column1 Like 1 OR Table.Column1 Like 2

    SELECT "*" FROM Table WHERE Table.Column1 Like 1 AND Table.Column2 Like 2
    Matt Jones
    MS Access Certified Professional 2K/2003

  7. #7
    Thanks for your help
    Last edited by apple; 08-06-2007 at 09:21 AM.

Posting Permissions

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