Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Sorting issue with database

Hi

Descending sort does not work by adding a - in front of the sort parameter.

ie. If you want to sort on a field called Date, you cannot add -Date in the parameter value. Date by itself will sort in Ascending order fine.

What is needed to sort in descending order?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Sorting issue with database

Could you clarify what you have tried and what exactly does not work? It seems to work in my app: http://prntscr.com/9bcdtd

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Sorting issue with database

Hi Sergiy

I think it is because I am connecting to an MSSQL database and it does not know how to interperet the -

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Sorting issue with database

MSSQL doesn't use property "sort". Please use ORDER BY for that: https://msdn.microsoft.com/en-US/libr...

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Sorting issue with database

Thank you. I will try that, however using sort works if you are sorting ascending.

Alberto da Silva
Posts: 0
Joined: Thu Jan 26, 2012 12:38 am

Sorting issue with database

how do you sort desc?

Guatemala Produtora
Posts: 0
Joined: Sat Sep 03, 2016 3:13 am

Sorting issue with database

Same issue here.
There's anyone who had solved it?

Guilherme

saurabh8122815
Posts: 0
Joined: Mon Mar 21, 2016 5:08 am

Sorting issue with database

Hi Guatemala Produtora,

which database you use for sorting. Appery db or other.

If appery database use, perform server code using - query parameter u have get as you want ascending or descending result.

Guatemala Produtora
Posts: 0
Joined: Sat Sep 03, 2016 3:13 am

Sorting issue with database

Hi Saurabh.

I tried that way before and didn't work. Do you know any java command (or an alternative method) that performs the same sort action?

Thanks in advance.

Guatemala Produtora
Posts: 0
Joined: Sat Sep 03, 2016 3:13 am

Sorting issue with database

Thank you!

Return to “Issues”