Malcolm,
Try
select curWord.cWord from curWord ;
LEFT JOIN curDictionary ;
ON curDictionary.cWord = curWord.cWord ;
WHERE curDictionary.cWord IS NULL ;
into cursor curMisspelled
select curWord.cWord from curWord ;
where NOT EXISTS ( select * from curDictionary ;
WHERE curDictionary.cWord = curWord.cWord ) ;
into cursor curMisspelled
>I'm looking at potential ways to speed up the performance of Craig Boyd's recently posted free VFP spellchecker class (check it out!)
>
>
http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,8800bdb9-a9c2-484f-942f-6a08947d903a.aspx>
>My thought was to build a cursor of all words in a block of text and compare that cursor to a cursor containing a list of all words in a dictionary. The result should be a list of misspelled words.
>
>To keep things simple, assume both cursors have a single field called cWord of the same length and that all words are lowercase. What is the most efficient way to compare my curWords to curDictionary to get a list of all words in curWords that are not in curDictionary?
>
>Here's my first pass:
>
>
>
>select cWord from curWord ;
> where curWord.cWord not in ( select cWord from curDictionary ) ;
> into cursor curMisspelled
>
>
>
>Any suggestions welcome. Also be sure to check out Craig's free spellchecker class!
>
>
--sb--