Strings are compared up to the length of the string on the left. As others have said, you need SET EXACT or exactly equals (==). I prefer exactly equals because then I don't have to remember to SET EXACT OFF and the code is easier to read.
>I am making a coding error that I cannot see. The != comparison is not being caught by the program and duplicate records are being recorded.
>
>
> SELECT indicators
> SCAN
> m.TheWord2 = ALLTRIM(LOWER(indicator))
> m.sidenote2 = action
> IF m.TheWord2 $ lcTEXT AND m.TheWord2 != m.TheWord1
> SELECT MASTER
> REPLACE indicator2 WITH m.sidenote2
> SELECT indicators
> REPLACE hits WITH indicator.hits + 1
> m.sidenote2 = ""
> ENDIF
> ENDSCAN
>
>
>What have I overlooked?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer