Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE OF SQL STATEMENTS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00004029
Message ID:
00004045
Vues:
33
>>Ok here is the question :
>>Lets say that i have a database with client_id,field1,field2, etc..
>>and another one related to the previous in a one to many relationship using the client_id field, my question is,
>>does anybody suggest a way to retrieve lets say all the client_ids tha satisfy the next condition :
>>
>>give me all the distinct client_ids whose field1=expresion
>>and field1=expresion or field1=expression...etc
>>
>>note that I need to find a record whose field1 or field2 or
>>any other should satisfy multiple conditions.
>>
>>Thanks in advance for any suggestion.
>>
>>"Luis Guzman"
>
>Assuming the following:
>
>Table 1 is the Parent (ie 1 Record)
>Table 2 is the Child of Table 1 (ie Many Record)
>The link between the two tables is Client ID
>
>Select A.* from Table1
>From Table1 A, Table2 B ;
>Where (a.client_id = b.client_id) And
> (Field1=XXX or Field2=YYY)
>Group By A.Client_ID
>
>I Prefer to use Group By instead of Distinct.
>This will
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform