>I'm having a little trouble with the following SQL statement. I'm not getting the results I need. I need the last inventory receipt and supplier for each item. Because of group by requirements I'm getting the last receipt for each supplier and item combination. How can I just return the last receipt but include the supplier information?
>
>Thanks In Advance
>
>Jeff
>
>
>select item, llstsup, max(recvdte) ;
>from temptran ;
>group by 1,2 ;
>into cursor ictran
There is an interesting discussion with 3 different approaches:
Re: Always trips me up! Thread #
1233129
If it's not broken, fix it until it is.
My Blog