Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Troubles with Queries
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00010874
Message ID:
00010945
Views:
27
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform