Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL most recent

Author  Topic 

MikeB
Constraint Violating Yak Guru

387 Posts

Posted - 2001-11-28 : 15:13:08
I need to know if there is a way to get a recordset in ado using an SQL Statement to the effect of:

SELECT * FROM MyTable WHERE id = 'ID' AND id2 = 'ID2' the 6 most recent entries by a date field??

Any help??

Mike B


izaltsman
A custom title

1139 Posts

Posted - 2001-11-28 : 15:23:16
SELECT TOP 6 * FROM MyTable WHERE id = 'ID' AND id2 = 'ID2' ORDER BY datefield DESC



Edited by - izaltsman on 11/28/2001 15:25:29
Go to Top of Page

MikeB
Constraint Violating Yak Guru

387 Posts

Posted - 2001-11-28 : 16:06:13
Thank you very much for you quick responce. I am very new to SQL language. I know a little but difficult to think of obvious with lack of experience! ;)

Mike B

Go to Top of Page
   

- Advertisement -