Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registros Duplicados
Message
From
07/06/2003 14:03:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00797664
Message ID:
00797665
Views:
11
>Disculpen, en alguna ocasion vi unos datos acerca de como detectar registros duplicados en una base de datos empleando select de SQL...
>Alguien me puede ubicar el No. de conversación, si es que lo tiene a la mano ?....

No recuerdo, pero una manera fácil es un SELECT - SQL con la cláusula GROUP BY.

Supongamos que el número de cliente, en la tabla de clientes, supuestamente es duplicado. El código sería algo así como:
select NumCliente, count(*) as NumVeces;
  from Clientes;
  group by NumCliente;
  order by NumVeces descending;
  where NumVeces > 1;
  into cursor Temp
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
Next
Reply
Map
View

Click here to load this message in the networking platform