Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Repeated records
Message
From
01/08/2007 18:01:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01245292
Message ID:
01245318
Views:
24
>>>Hi everyone
>>>
>>>How can I detect the repeated records in a table ?....
>>>
>>>Thanks in advance
>>>Carlos Burgos
>>
>>Basically a SELECT, with a GROUP BY clause.
>>
>>If your primary key is called PKField, the code would be something like this:
>>
>>
>>select PkField, count(*) as HowMany;
>>  from MyTable;
>>  group by PkField;
>>  having HowMany > 1
>>
>
>If you have duplicate PK, it would not be PK anymore :)

Oh, well, let's assume they want to promote it to a primary key <g>.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform