Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
How to sort a List()? |
Mon, Aug 25 2014 12:26 PM | Permanent Link |
Barry | Often I need to return a sorted list from a table. Often I need unique values in the list.
Select List(Cust_Name) from Customers; produces an unsorted list. So does: Select List(Cust_Name) from (Select Cust_Name from Customers group by Cust_Name) tx It does not appear the List() can return a sorted list no matter what I do. Any suggestions? TIA Barry |
Mon, Aug 25 2014 12:32 PM | Permanent Link |
Raul Team Elevate | On 8/25/2014 12:26 PM, Barry wrote:
> Often I need to return a sorted list from a table. Often I need unique values in the list. > > Select List(Cust_Name) from Customers; > > produces an unsorted list. > > So does: > > Select List(Cust_Name) from (Select Cust_Name from Customers group by Cust_Name) tx > > It does not appear the List() can return a sorted list no matter what I do. > Any suggestions? How about SELECT LIST(ORDERED Cust_Name) ... Raul |
Mon, Aug 25 2014 3:28 PM | Permanent Link |
Barry | Raul wrote:
>How about SELECT LIST(ORDERED Cust_Name) ...< Yes, that will do it. I'm using v2.13B2 and the List() "Ordered" option wasn't in the SQL PDF file. But I see the online documentation has been updated though. I can also use: SELECT LIST(ORDERED DISTINCT Cust_Name) ... which solves the other problem. Cool! Thanks. Barry |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |