|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Retrieve Records In Reverse Order
I would like to get the records out starting with the last in first and so on. Is there a way to do that with using Order By.<br><br>My select statement is as follows:<br><br><div class="msgQuoteWrap"><div class="msgCode">SQL = "select * from DiscussionTopicComment Where ComboHex = '" & GetRecordNumber & "'"</div></div><br><br>I just want to reverse the order I do not want to Order them on any on field.<br><br>Thanks<br>Nevyn
|
|
#2
|
|||
|
|||
|
I would add DESC on the end of the SQL DESC = Desending order.<br>It will look like this after:<br>SQL = "select * from DiscussionTopicComment Where ComboHex = '" & GetRecordNumber & "' DESC"
|
|
#3
|
|||
|
|||
|
I tried your suggestion but it does not work. Thanks for trying<br><br>Nevyn
|
|
#4
|
|||
|
|||
|
DECS works when used after an ORDER BY.
|
|
#5
|
|||
|
|||
|
Ya - as Draiken said, you need to use ORDER BY first. This is needed to let the db know which column to use to do the sorting:
Code:
SELECT column,column,column FROM some_table WHERE somthing = something ORDER BY column DESC |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Retrieve Records In Reverse Order |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|