Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find where more than 1 record exists
Message
De
02/05/2003 13:17:01
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
 
 
À
02/05/2003 08:49:10
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:
00784222
Vues:
25
Renoir,

Profuse apologies < Liam bangs head against desk >. Must learn to read before replying. Also, apologies for calling you Jim. It must be Friday!

Regards,

Liam





>Liam,
>
>I appreciate your help, but that was exactly the question I asked; read it all.
>
>Renoir
>
>>Hi Jim
>>
>>what would be the SQL logic to Select only records where there were more than one meeting the criteria
>>
>>Answer : Use DISTINCT in the SQL statement.
>>
>>That doesn't exclude the record for Jim
>>
>>That wasn't the question you asked. You should use WHERE in the SQL Statement to define the condition that records must meet to be included in the returned data.
>>For Example :
>>
Where Field1 = "John"
or
Where Field1 != "Jim"
>>
>>
>>Regards,
>>
>>Liam
>>
>>
>>
>>
>>>Liam,
>>>
>>>That doesn't exclude the record for Jim.
>>>
>>>Renoir
>>>
>>>
>>>>Hi Renoir,
>>>>
>>>>Use DISTINCT in the SQL statement.
>>>>
>>>>Regards,
>>>>
>>>>Liam
>>>>
>>>>>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
Liam O'Hagan
MCP VFP Desktop Apps
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform