Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for duplicates
Message
 
À
07/03/2006 14:39:08
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01102167
Message ID:
01102169
Vues:
21
>Using VFP9, how can I check for the occurrence of a part existing more than once in an order?
>
>The following dataset contains part# 'part2' twice.
>
>order# part#
>1 part1
>1 part2
>1 part3
>1 part2
>2 part1
>2 part2
>etc....
>
>I would like to see a query result that states 'part2' is found twice for order# 1. How can I do this?
>
>Thanks,
>
>Jerry
SELECT Order, Part, COUNT(*) AS Cnt;
      FROM MyTable;
GROUP BY Order, Part;
HAVING Cnt > 1
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform