RE: Get newest record?

2001-01-29 Thread DeVoil, Nick
SELECT * from orderTable WHERE orderId = (SELECT max(orderId) FROM orderTable WHERE usercode = 'usercode') -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 27, 2001 3:42 AM To: CF-Talk Subject: Get newest record? I have a query that returns placed

Re: [Get newest record?]

2001-01-27 Thread Alex
max(orderid) "Jon Hall" [EMAIL PROTECTED] wrote: 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

Get newest record?

2001-01-26 Thread Jon Hall
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