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:
00041412
Views:
71
>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...

Vinod,

sorry I made a confusion, the code in my previous message should also give you 4 records, as you have the same code in all four records...

I believe your problem comes from your data structure : if each address corresponds to a contact, then your address table should be linked to the contact table, so you need an additional code in address, and that code should be used in contact instead of the name code.

With your present structure, you have no way to determine which address goes with which contact, so you get all 4 combinations when you have 2 addresses and 2 contacts.

Christian
Christian Desbourse ( Belgium )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform