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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL query to only show newer records in a table by stored date

Status
Not open for further replies.

hallm

Programmer
Jun 11, 2000
159
US
I want to be able to list only the newest six or seven records in my table by date.&nbsp;&nbsp;(Not by newest keyed in, sometimes we backdate and prodate records).&nbsp;&nbsp;How can I modify my sql statement to do this?&nbsp;&nbsp;Or do I have to do this another way?&nbsp;&nbsp;My current statement is below.<br><br>set sleuth = db.execute(&quot;SELECT * FROM cybersleuth WHERE publish = true ORDER BY date desc, time desc&quot;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top