?
Solved

How to count the duplicated lines in VFP ?

Posted on 2011-03-04
2
Medium Priority
?
493 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 42

Accepted Solution

by:
pcelba earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

764 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