Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Troubles with Queries
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00010874
Message ID:
00010945
Vues:
28
>>Well my latest problem has to do with queries. I have two tables I want to search they are related by location in a one to many fashion. When I run a query looking for all the records at a given location, I get the correct record from the parent table, but from the child I only get the first on that matches the criteria. All help is greatly appreciated. Thanks for all the help in the past and in the future.
>
>Looks OK to me.
>"select a.*,B.* from testp a, testc b where (a.loc=b.loc)AND b.name="TST""
>
>Where TestP is the Parent and TESTC is the child. Only those records that match in both tables will be returned by the SQL routine. U may need an outer join if you wish to grab all parents reguardless if they have children records or not. Are U using distinct or group by in Ur SQL? OR Did U reverse the A.LOC=B.LOC to B.LOC=A.LOC. This is a common problem, I do myself, be careful because U will get only one child records like Ur are getting now. I would bet that is your problem. Let me know if that was it. The simple stuff usally takes days to figure out. Steve

Steve,
Thanks for the help. My problem was that I was using group by, an dthat
was finding only the first record. I am really new at this fox
prom stuff and all of your help has been great. My next task is
to build a menu and an appliation. Any word of wisdom before I
Start :-) Thanks again.
Bob
Bob Sides
SDGS
Vermillion, SD
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform