Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Oddity
Message
From
14/10/1997 16:52:01
 
 
To
14/10/1997 16:45:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00054536
Message ID:
00054539
Views:
36
>The following SQL runs great:
>
>SELECT (a bunch of fields)
> FROM temptest!memb JOIN temptest!leghist;
> INNER JOIN temptest!campus;
> INNER JOIN temptest!isd;
> INNER JOIN temptest!local ;
> ON Memb.mlocalnum = Local.localnum ;
> ON Isd.isdnum = Campus.cisdnum ;
> ON Campus.campusnum = Memb.mcampusnum ;
> ON Memb.membnum = Leghist.lmembnum;
> WHERE Leghist.lmembnum = 1;
> AND DELETED() = .F.;
> ORDER BY Leghist.ldate DESC
>
>but when I change the first join to an outer join;
>
>SELECT (a bunch of fields);
> FROM temptest!memb LEFT OUTER JOIN temptest!leghist;
> INNER JOIN temptest!campus;
> INNER JOIN temptest!isd;
> INNER JOIN temptest!local ;
> ON Memb.mlocalnum = Local.localnum ;
> ON Isd.isdnum = Campus.cisdnum ;
> ON Campus.campusnum = Memb.mcampusnum ;
> ON Memb.membnum = Leghist.lmembnum;
> WHERE Leghist.lmembnum = 1;
> AND DELETED() = .F.;
> ORDER BY Leghist.ldate DESC
>
>the SQL progress bar pops up, goes straight to 100%, and sits there for about 3 minutes. What would cause this?

Nothing is perfect. Progress bar probably traces 'inner' part of join only, and then wait until 'outer' part (UNION) will be completed. You can see similar behaviour when GROUPing join results. BTW, it's better to dismember complex SELECT and run it step by step.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform