Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate Records
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00605795
Message ID:
00605828
Views:
20
What's the type of the orgtracnum field?
BTW, you can combine those two queries in one.
SELECT * ;
	FROM january ;
	WHERE orgtracnum IN ;
		( SELECT  orgtracnum, ;
		FROM january ;
		WHERE NOT EMPTY(orgtracnum)  ;
		GROUP BY orgtracnum ;
		HAVING COUNT(*) > 1   ) ;
	Order BY orgtracnum, amount ;
	INTO table alldupes
>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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform