Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check fo dups

Status
Not open for further replies.

Mike Gagnon

Programmer
Apr 6, 2002
8,067
CA

Anyone know how to check for duplicates on MySql with VFP?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I thing the same way as with MSSQL an VFP, the ANSI SQL can be used for that

Example: this returns count of duplicate records by giver criteria in GROUP BY clause
Code:
SELECT COUNT(*) FROM your_table GROUP BY some_column_or_columns_or_expressions HAVING COUNT(*) > 1

It depends of what you are want to return:
List of duplicate records or only test if there are some duplicate records in table by given criteria.
Or you want to search duplicates by all columns ? e.g. find full duplicated rows ?

Zhavic


---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
 

It seems mySQL does like that.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top