Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help - Outer joins and such
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Help - Outer joins and such
Miscellaneous
Thread ID:
00162258
Message ID:
00162258
Views:
47
I'm getting unexpected results from a complex join - perhaps folks on UT can help me.

My database structure is:

Library -> LinkSect -> Sections (1 to many)
Library -> LinkManu -> Manuf (1 to many)
Library -> Reps

The SQL statement I got from the view designer is:

SELECT *;
FROM Library!Library ;
LEFT OUTER JOIN library!reps;
LEFT OUTER JOIN library!LinkSect;
INNER JOIN Library!Section;
LEFT OUTER JOIN library!linkmanu;
INNER JOIN library!manuf;
ON LinkManu.Manuf_Code = Manuf.Code ;
ON Library.Code = LinkManu.Lib_Code ;
ON Library.Code = LinkSect.Lib_Code ;
ON LinkSect.Sect_Code = Sections.Number ;
ON Library.Rep_Code = Reps.Rep_Code

What seems odd to me is that I don't see where VFP is saying to link Sections to LinkSect, and not Library.

The wierd result I'm getting is that the first record in SECTIONS is being associated with EVERY record in the result set - rather than the record associated through the LinkSect table.

Help would be appreciated.

TIA
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Next
Reply
Map
View

Click here to load this message in the networking platform