Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Relation Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01358947
Message ID:
01359100
Vues:
35
In general, a RIGHT JOIN can be replaced by a LEFT JOIN . However in this case there's no point in using RIGHT JOIN at all because it'll be killed by WHERE clause - WHERE BETWEEN(SoMain.date, dt1, dt2) anyway but will slow the query.
Also query is hard to read because table names/aliases are not present/defined in the query itself.

>Try with
>
>lcPath = [K:\FAS\]
>lcPathSoMain = lcPath+[SoMain]
>lcPathSosUb  = lcPath+[SosUb]
>lcPathPCode  = lcPath+[PCode]
>lcPathIcode    = lcPath+[Icode]
>
>SELECT SoMain.*, SosUb.ICode, SosUb.qntymaj, SosUb.qntymin,;
>            SosUb.RateMaj, SosUb.RateMin,;
>            PCode.full_Name, pcode.address, pcode.tel1, pcode.tel2, pcode.tel3, ;
>           Icode.full_desc, icode.unit ;
> FROM (lcPathSoMain);
>	  RIGHT JOIN (lcPathSosUb) ON SoMain.SoNo == SosUb.SoNo;
>	  LEFT JOIN   (lcPathPCode) ON SoMain.PCode == PCode.PCode;
>	  LEFT JOIN   (lcPathIcode)   ON SosUb.Icode  == Icode.Icode;
>	  WHERE BETWEEN(SoMain.date, dt1, dt2) INTO CURSOR cSomain
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform