June 17, 2008 at 5:25 am
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.
June 17, 2008 at 5:27 am
How embarrassing... I posted too early! Haha. SELECT last_name
FROM Employee
WHERE last_name NOT LIKE '%e%';
This is resolved. 😀
June 17, 2008 at 5:28 am
The expression you have will match true for ANY character that is NOT an e
Something like ... NOT like '%e%' should do the job
June 17, 2008 at 5:31 am
Mike John (6/17/2008)
The expression you have will match true for ANY character that is NOT an eSomething 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