Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Oddity
Message
De
14/10/1997 16:52:01
 
 
À
14/10/1997 16:45:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00054536
Message ID:
00054539
Vues:
41
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform