Information générale
Catégorie:
Codage, syntaxe et commandes
>>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
Thanks for your answer... But I don't want to link phone nos. with address. It is like that there are 2 phone nos. of person and 2 address..
Isn't there any way to get it..
As similar kind of structure, I'm having in my other projects also, where one master is linked with 3-4 childs, but no child is linked with each other..
Pls give your suggestions....
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement