In our case it will always be accurate since new stock always gets a new SKU and editing the cost price is not permitted so the most recent record will always contain the last price paid, 100%, completely predictable.
I am not after a discussion on best practices just wanting to know if there is a SQL Server 2000 equivalent to the LAST() function from SQL Server 2005. -----Original Message----- From: G Money [mailto:[EMAIL PROTECTED] Sent: 19 November 2007 15:36 To: CF-Community Subject: Re: MSSQL Aggregate Functions But ultimately unpredictable, and therefore not always correct. You don't want the last record inserted, you want the most recent cost price. Maybe they should always be the same, but they might not for whatever reason. You need to join to your table that has either your aggregator or your date stamp and get the max value. It's the only way your code will be 100% correct. On Nov 19, 2007 9:15 AM, James Smith <[EMAIL PROTECTED]> wrote: > I do, I have both of those and currently do a join onto a subquery to get > this data but the LAST() function would make for much simpler code. > > -- > Jay > -- And all this could be Just a dream so it seems I was never much good at goodbye ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:246744 Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5