SQLselect : RegEx search records where field DOES NOT contain string

Wonder Fef wonderfef at noos.fr
Wed Mar 26 14:09:35 CST 2003


>> I'd like to launch a SQL Query to get records that DOES NOT contain a
>> specified string, something like :
>> 
>> SELECT * FROM myTable WHERE myStrField NOT LIKE 'ABC' no_case
>> 
>> Any clue?
> 
> But your query must work.  No?

Example:
Rec 1 : myStrField = "ABCDEF"
Rec 2 : myStrField = "ABC"
Rec 3 : myStrField = "DEF

SELECT * FROM myTable WHERE myStrField NOT LIKE 'BCD' no_case

...would return me Rec 2 and Rec 3, but not Rec 1

> I do not remember, NOT LIKE or LIKE NOT is correct syntax.
> Check SQL.pdf
In the SQL.pdf, the NOT parameter is only shown with a regular search (using
'=' instead of 'LIKE')
'=' does not allow me to search if a field CONTAIN a string.

The RegEx documentation is too difficult for me to understand...

Thanks for your help.
Eric



More information about the Valentina mailing list