>>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.