Solved

How to count the duplicated lines in VFP ?

Posted on 2011-03-04
2
483 Views
Last Modified: 2012-06-27
Hi Experts !

Could you explain a way to count duplicated lines at a VFP table. I'm using the code below but it doesn't work.
 
select sb_disp, count(sb_disp) as count;
	from DISP_PUB;
	WHERE count(sb_disp) >1;
	group by sb_disp;
	order by sb_disp desc;
	into cursor t_disp

Open in new window


(Error: File 'count.prg' does not exist

Thanks in advance !
0
Comment
Question by:Eduardo Fuerte
2 Comments
 
LVL 42

Accepted Solution

by:
pcelba earned 500 total points
ID: 35035780
Aggregated results require HAVING clause for post-aggregate result filtering:

select sb_disp, count(sb_disp) as count;
	from DISP_PUB;
	group by sb_disp;
	HAVING count(sb_disp) >1;
	order by sb_disp desc;
	into cursor t_disp

Open in new window

0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 35036356
Perfect.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
dedupe in foxpro 12 464
Save Table Settings 6 263
Life afer Fox Pro 3 105
Could you explain what Codeplex Sedna project exactly is? 1 572
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Some of the SEO trends we might expect in 2017.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question