Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Problem in 3 files
Message
 
To
23/07/1997 10:08:43
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00041299
Message ID:
00041408
Views:
80
>>>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 )
Previous
Reply
Map
View

Click here to load this message in the networking platform