I am trying to select the most recent cost price for a product, the simple
solution would seem to be...

SELECT m.Title, LAST(s.cost) AS Cost
FROM   main m
       JOIN stock s ON (s.ProductID = m.ProductID)
WHERE  some conditions

However the LAST aggregate function seems not to be supported in MSSQL 2000
and I don't fancy and upgrade to 2005 just to get this one function.

Any better ideas anyone?

--
Jay

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 18/11/2007
17:15
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:246695
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5

Reply via email to