Lisp HUG Maillist Archive

Common SQL: Query and Order

Hello,

Someone knows how to select by descending order in Common SQL?
I can’t seem to find the documentation about it...


Best,
Camille

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Common SQL: Query and Order

Nevermind, I found the answer in Common SQL tutorial:
(http://www.lispworks.com/documentation/sql-tutorial/index.html#section-5..2)

The order clause is a list of SQL identifiers, so if you are using the OO interface:


   :order-by (list [slot-value 'employee 'name])

Sorts by employee’s ascending order, whereas:


   :order-by (list (list [slot-value 'employee 'name] 'desc))

Sorts by employee’s descending order.


Best,
Cam



On 22 Jan 2014, at 14:36, Camille Troillard <camille@osculator.net> wrote:

> 
> Hello,
> 
> Someone knows how to select by descending order in Common SQL?
> I can’t seem to find the documentation about it...
> 
> 
> Best,
> Camille
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:34 UTC