Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find where more than 1 record exists
Message
 
À
01/05/2003 13:48:27
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00783789
Message ID:
00783793
Vues:
11
sele myfield1,myfield2 from ... group by 1,2 having cnt(*)=2

>I can easily do this with 2 statements, but what would be the SQL logic to Select only records where there were more than one meeting the criteria:
>
>
>MyField1     MyField2
>========     ========
>John         12345
>Jim          98765
>John         12345
>
>
>I only want this as a result:
>
>
>John         12345
>
>
>I only want 1 record with John and do not want Jim at all.
>
>Thanks, Renoir
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform