Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL How to?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01293891
Message ID:
01293908
Views:
16
>>How can I just return the last receipt but include the supplier information?
>>
>>select item, llstsup, max(recvdte) ;
>>from temptran ;
>>group by 1,2 ;
>>into cursor ictran
>
>Several ways to do this. I'd use 2 sql statements - the first to get the last receipt itself and the second to get the supplier associated with it. Try the following...
>
>
>SELECT ITEM, ;
>        MAX(RECVDTE) AS qdLastReceipt ;
>FROM TEMPTRAN ;
>GROUP BY 2 ;
>INTO CURSOR _STEP1
>
GROUP BY 2?
How could you GROUP by MAX(...)?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform