Smartin
asked on
What does the "desc" do at the end of this sql statement
Howdy all,
Confused... I have a view in SQL that orders my outbound call pot. It was created for me by the software vendor. Does anyone know what the "desc" does to the following:
ORDER BY dbo.Activity.IPCMPriority DESC, Start_date DESC, Start_Time
When I add a sort on a field it doesnt add it to the field name??
Regards...
Confused... I have a view in SQL that orders my outbound call pot. It was created for me by the software vendor. Does anyone know what the "desc" does to the following:
ORDER BY dbo.Activity.IPCMPriority DESC, Start_date DESC, Start_Time
When I add a sort on a field it doesnt add it to the field name??
Regards...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ORDER BY dbo.Activity.IPCMPriority DESC, Start_date DESC, Start_Time
here in your example your result set is sorted from bigger value to the smaller value for the IPCMPriority column then sorted by the Start_date from the newer date to the oldest date ...
here in your example your result set is sorted from bigger value to the smaller value for the IPCMPriority column then sorted by the Start_date from the newer date to the oldest date ...
ORDER BY would sort it ASC, DESC depending on what you specify. Default would be ASC.
ASKER