Word-index Not

Osborne

Active Member
It might be a bit slow but I suppose you could do something like this:
Code:
FOR EACH customer NO-LOCK WHERE customer.Comments CONTAINS "cat" AND
  INDEX( customer.comments, "dog") = 0:
END.
 

RealHeavyDude

Well-Known Member
I believe it will definately be slow since the compiler can't bracket on an index and it will cause a table scan to resolve it.

I would have it this way:
Code:
for each customer no-lock where customer.comments contains "cat":
  if index ( customer.comments, "dog" ) = 0 then do:
    /* Your stuff */
  end.
end.


Heavy Regards, RealHeavyDude.
 
Top