Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing 2 tables; getting list of missing records
Message
 
 
À
01/08/2005 10:27:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01037464
Message ID:
01037467
Vues:
40
This message has been marked as the solution to the initial question of the thread.
Malcolm,

Try
* LEFT JOIN
select curWord.cWord from curWord ;
	LEFT JOIN curDictionary ;
		ON curDictionary.cWord = curWord.cWord ;
	WHERE curDictionary.cWord IS NULL ;	
	into cursor curMisspelled

* Correlated subquery
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform