Jun 3, 2004 #1 MaxEd Technical User Joined Jul 3, 2002 Messages 407 Location US I need help to return only 25 records from the tables based on a specific date and city. I need it done ASAP... THANKS! -Laughter works miracles.
I need help to return only 25 records from the tables based on a specific date and city. I need it done ASAP... THANKS! -Laughter works miracles.
Jun 3, 2004 #2 RobSchultz Programmer Joined Jun 1, 2000 Messages 444 Location US SELECT TOP 25 ... HtH, Rob -Focus on the solution to the problem, not the obstacles in the way.- Upvote 0 Downvote
Jun 3, 2004 Thread starter #3 MaxEd Technical User Joined Jul 3, 2002 Messages 407 Location US I used a ordered by DESC and it returned all the records -Laughter works miracles. Upvote 0 Downvote
Jun 3, 2004 #4 amorous Programmer Joined Sep 5, 2003 Messages 1,008 Location US Try something like this: SELECT TOP 25 FROM yourtablename WHERE City='"&cityvar&"' AND datefield='"&datefield&"' ORDER BY datefield DESC -VJ Upvote 0 Downvote
Try something like this: SELECT TOP 25 FROM yourtablename WHERE City='"&cityvar&"' AND datefield='"&datefield&"' ORDER BY datefield DESC -VJ