Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Problem in 3 files
Message
 
À
23/07/1997 10:08:43
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041299
Message ID:
00041408
Vues:
78
>>>SQL is not fun...Always I face problem in it...
>>

don't despair, SQL is fun when you solve the problem
SQL without problem then you have nothing to solve and you get bored <g>

>Select name.Name, Contact.phone, address.address ;
> from name, contact, address ;
> where name.code=contact.code and contact.code=address.code group by name.code
>
>but it is giving me one record only...

try this :

SELECT name.Name, Contact.phone, address.address ;
FROM name, contact, address ;
WHERE name.code = contact.code AND ;
name.code = address.code AND ;
contact.code = address.code

don't forget that SQL without any WHERE clause would combine all records from name with all records from contact and all records from address. With the first two conditions, it is normal that you have 4 records, which are the combinations of the two final records you are looking for.

Hope this helps

Christian
Christian Desbourse ( Belgium )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform