Page 1 of 1

Queries and Result Ordering

Posted: Thu Sep 17, 2015 11:27 pm
by mjamaluddingari
Hi,

I have completed the Queries and Result Ordering training from the academy and it is so much helpful. It says "In the next tutorial, we will populate the results from the table". I was just wondering where I can find that "next tutorial". Anyway, my related question to the video is how do I do the ordering based on values from a result set. For example, let's say the enumeration 'Genre' has a list of literals and I wanted to do the ordering based on values. I want the order to be mystery, horror, fiction, nonFiction. Generally, using sql query I would use
Code: Select all
ORDERY BY CASE GENRE WHEN mystery then 1
                     WHEN horror then 2
and so on..

How do I specify in this case? Appreciate your help.

Re: Queries and Result Ordering

Posted: Fri Sep 25, 2015 5:57 am
by mjamaluddingari
Is it the wrong place to post or the question is invalid?

Re: Queries and Result Ordering

Posted: Fri Sep 25, 2015 10:07 am
by Radovan Cervenka
In LSPS queries, it is impossible to specify "ORDERY BY CASE" style of ordering. However, you can specify SQL native query or Java function for querying DB. How urgent is this feature for you? I'm asking in order to access its urgency for creating a feature request, if you want to have it in LSPS.

Re: Queries and Result Ordering

Posted: Fri Sep 25, 2015 4:53 pm
by mjamaluddingari
Thank you for the response. We would definitely love to have this feature in LSPS queries. And at my company it is always 'ASAP'. :D

Re: Queries and Result Ordering

Posted: Mon Sep 28, 2015 10:43 am
by Radovan Cervenka
Feature request has been created and preliminarily planned for LSPS 3.2 (1st quarter 2016).