Solved

How to count the duplicated lines in VFP ?

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

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now