Solved

How to count the duplicated lines in VFP ?

Posted on 2011-03-04
2
485 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fox9 and Windows 8 4 3,022
Foxpro, Word 2003 Automation and Windows 7 10 919
one to many join on two fields vfp 2 696
Using UDFs in grids 3 253
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…
Read our guide on how to survive being on-call.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

679 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