Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subquery Troubles
Message
From
20/11/2014 18:59:43
 
 
To
20/11/2014 17:47:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01611202
Message ID:
01611266
Views:
52
>vfp9

Give this a try.

It seems OK here but I have very limited test data.
SELECT a.vendno, b.item,b.lrecdte,v.company FROM icsupl01 a INNER JOIN   (SELECT  ITEM , MAX(LRECDTE) AS lrecdte  FROM  icsupl01 GROUP BY item) b
ON a.item = b.item AND a.lrecdte = b.lrecdte INNER JOIN apvend01 v ON a.vendno = v.vendno 
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Reply
Map
View

Click here to load this message in the networking platform