Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subquery Troubles
Message
De
21/11/2014 16:18:11
 
 
À
21/11/2014 15:21:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01611202
Message ID:
01611312
Vues:
55
>Bill,
>
>I have to include VENDNO otherwise the next join fails.
>
>INNER JOIN apvend01 v;
> ON S.vendno = V.vendno;
>
>
>
>Jeff

Right, but having vendno in there doesn't give us the grouping we want, so we need another way of getting the vendno.

Try patching this in instead of what you have.
It runs OK here on its own.
I can't test the full query here.
 SELECT * FROM ( SELECT i.item, a.lrecdte, i.vendno, v.company FROM (SELECT  ITEM , MAX(LRECDTE) AS lrecdte  FROM  icsupl01 GROUP BY item ) AS a INNER JOIN icsupl01 i ON i.item = a.item AND i.lrecdte = a.lrecdte INNER JOIN apvend01 v ON i.vendno = v.vendno) as q
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform