Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One parent and Many children
Message
De
29/05/1997 12:30:39
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
 
À
29/05/1997 12:09:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00034072
Message ID:
00034079
Vues:
31
>I have a master table that holds the name and ID for each entity in the database. The child tables (about 10) hold all of the information about each entity. I want to perform 1 query and retrieve all of the information about every matching entity and what table that information came from. Is this last part possible?
>thanks

If I follow, you could do something like

c1="child1"
c2="child2"

SELECT M.ID, M.name, c1 + "-" + ch1.field1 AS info1, c2 + "-" + ch2.field1 AS info2 ;
FROM Master M, child1 ch1, child2 ch2 ;
WHERE M.ID = ch1.ID AND M.ID = ch2.ID

This will give you busy data though

do you have common columns? are you planning on using a UNION?
If you don't have common columns, then you'll know where the info came from by which column number it's in.

HTH
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform