Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Dec 2002
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    not like function (2000)

    I'm using Not Like "John" , this worked great but I need to also exclude Mary. When I add not like "Mary" the Query gives me everyone including John and Mary. How do you write a query to exclude John and Mary?

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: not like function (2000)

    You need to combine what you don't want with an AND

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: not like function (2000)

    Here a sample of what Mike say :

    SELECT Table1.FirstName
    FROM Table1
    WHERE (((Table1.FirstName) Not Like "john" And (Table1.FirstName) Not Like "mary"));

    or in attachment the Query design view
    Attached Images Attached Images
    Francois

Posting Permissions

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