Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!! Emergency Select 25 records only

Status
Not open for further replies.

MaxEd

Technical User
Jul 3, 2002
407
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.
 
SELECT TOP 25 ...

HtH,

Rob

-Focus on the solution to the problem, not the obstacles in the way.-
 
I used a ordered by DESC and it returned all the records

-Laughter works miracles.
 
Try something like this:

SELECT TOP 25 FROM yourtablename WHERE City='"&cityvar&"' AND datefield='"&datefield&"' ORDER BY datefield DESC


-VJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top