Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate Records
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00605795
Message ID:
00605872
Vues:
17
>I still have not really found a routine to find duplicates that works for me.
>
>I used to use the code that I found in Fox Pro magazine but strated using this one someone here gave to me.
>
>SELECT settdate, amount, orgtracnum, ;
>	COUNT(*) AS dupes,  bankname ;
>	FROM january ;
>	WHERE NOT EMPTY(orgtracnum)  ;
>	GROUP BY january.orgtracnum ;
>	HAVING dupes > 1   ;
>	INTO table duplicates
>	
>	SELECT * ;
>	FROM january ;
>	WHERE orgtracnum IN ;
>	(SELECT orgtracnum FROM duplicates) ;
>	GROUP BY orgtracnum, amount ;
>	INTO table alldupes
>
>It finds the duplicates but it also sticks in things that almost match.
>
>For example:
>
>orgtracnum = 1234569 and orgtracnum = 1234568
>
>It looks at the first six characters and says it found a match when we know that is not the case. How can I change this code to find exactly what i am looking for? I tried setting exact on but it still does not work. I am using VFP 6.0

For SQL it's SET ANSI ON, but it should not behave the way, you described. Look closely at the data, are you sure, you get 1234569 and 1234568 as dups? What is the type of this field?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform