Print Page | Close Window

SQL Display reverse order

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8950
Printed Date: 30 March 2026 at 7:27am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: SQL Display reverse order
Posted By: jimidy
Subject: SQL Display reverse order
Date Posted: 15 January 2004 at 8:06pm

Hi I'm using the following SQL, and wanted to know how to display what I'm showing in reverse order, so newest first, thanks!

<%
 sql = "Select * from News"
 rs.open sql,myconn,3,3
 rs.movefirst
 do until rs.eof
%>



-------------
www.srp.me.uk



Replies:
Posted By: psycotik
Date Posted: 15 January 2004 at 8:59pm

SELECT * FROM News ORDER BY NewsID DESC

change newsid to the fieldname you want to sort in reverse by. (id, date, or name, etc.)



Posted By: jimidy
Date Posted: 15 January 2004 at 9:27pm
Nice one psyc, worked a charm..  

-------------
www.srp.me.uk



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net