LIKE keyword issues

  • Hi. I'm trying to display all employees who do not have an 'e' in their last name with this code:

    SELECT last_name

    FROM Employee

    WHERE last_name LIKE '%[^e]%';It's bringing up all of my employees though... even ones with an 'e' in their name. Am I even using the right keyword?.. should I be using IN or something?

    Cheers.

  • How embarrassing... I posted too early! Haha. SELECT last_name

    FROM Employee

    WHERE last_name NOT LIKE '%e%';

    This is resolved. 😀

  • The expression you have will match true for ANY character that is NOT an e

    Something like ... NOT like '%e%' should do the job

  • Mike John (6/17/2008)


    The expression you have will match true for ANY character that is NOT an e

    Something like ... NOT like '%e%' should do the job

    Cheers for that clarification. Haha I was wondering what it actually did. :s

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply