I'm trying to use a negation of a regular expression with no avail. What I am trying to do is create a query that does not match the search string. Yes, I know you can do this with a NOT LIKE expression, but want to do this with a regular expression because I will have to add other conditions to the expression.
For example, I want to find all occurrence in the field last_name that don't begin with the letter O. This works:
However how would I accomplish finding all occurrences of a string string that is not 'olse'? The occurrences would not necessary begin at the start of the string. They could be in any part of the string.
Thanks in advance.
For example, I want to find all occurrence in the field last_name that don't begin with the letter O. This works:
Code:
SELECT last_name
FROM employees
WHERE REGEXP_LIKE('^[^O]');
However how would I accomplish finding all occurrences of a string string that is not 'olse'? The occurrences would not necessary begin at the start of the string. They could be in any part of the string.
Thanks in advance.