SQLselect : RegEx search records where field DOES NOT
containstring
Frank Bitterlich
bitterlich at gsco.de
Fri Mar 28 21:13:52 CST 2003
I had problems remembering the right syntax order for not-like-queries
for a long time, until I thought about it this way:
"NOT" is a unary operator (ie. works on a single argument), so it can
never stand between two values like the comparison operators (=, >, <,
LIKE ...) do. So it must stand BEFORE an expression.
... where NOT (abc LIKE 'xyz')
... just that you can drop the parentheses.
Hope that helps somebody...
Cheers,
Frank+++
Ruslan Zasukhin wrote:
>
> on 3/27/03 6:08 PM, Richard Altenburg at valentina at brainchild.nl wrote:
>
> > On 26-03-2003 16:52, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> >
> >>> Ruslan Zasukhin wrote:
> >>>> Question is: query
> >>>> SELECT * FROM myTable WHERE myStrField NOT LIKE 'BCD' no_case
> >>>> do not work for you correctly???
> >>>> Or you have not try?
> >>> Yes I tried, but it does not work...
> >>
> >> Send me small db
> >>
> >> I will try in viSQL.
> >
> > I think the original poster should try this:
> >
> >
> > SELECT * FROM myTable WHERE NOT myStrField LIKE 'BCD' NO_CASE
> >
> >
> > So the word NOT should be right after WHERE, and shouldn't be before the
> > word LIKE.
> >
> > Try it, you might be surprised!
>
> Hi Ricahrd,
>
> Thank you for TIP. You are right.
>
> Eric, I have check it works fine with your project.
--
Günter Schmidt & Co. oHG
Frank Bitterlich eMail: bitterlich at gsco.de
Schlosserstr. 4 WWW: http://www.gsco.de/gsco
D-60322 Frankfurt Tel.: 069 / 156809-29
GERMANY Fax: 069 / 156809-28
More information about the Valentina
mailing list