I have a query that returns placed orders by a customer. How would I pull
olny the newest order by a particular customer?
I have a datestamp field and an autonumber id field if that helps...
I know I could do
SELECT TOP 1 *
FROM orderTable
WHERE usercode = 'usercode'
ORDER BY orderdatetime DESC
But this seems rather ineffiecient, anyone know of a better way?
jon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists