Sorting Question

Beerman3436

Registered User.
Local time
Today, 04:56
Joined
Mar 29, 2000
Messages
29
How can I sort this code ascending or descending order?
.Source = "Select TOP 20 [Name],[Alloc],[Total] From QrySML WHERE QrySML.Alloc>=100 ORDER By [Alloc]"


Where would I put the sort order?
 
Ascending is the default sort order:

"Select TOP 20 [Name], [Alloc], [Total] From QrySML WHERE QrySML.Alloc >= 100 ORDER By [Alloc];"


"Select TOP 20 [Name], [Alloc], [Total] From QrySML WHERE QrySML.Alloc >= 100 ORDER By [Alloc] DESC;"


Don't forget your semi-colons at the end ;)
 

Users who are viewing this thread

Back
Top Bottom