Introduce SORTLIST function
---------------------------

                 Key: CORE-4520
                 URL: http://tracker.firebirdsql.org/browse/CORE-4520
             Project: Firebird Core
          Issue Type: New Feature
            Reporter: Tim Kelly


It would be useful to have a built in function to sort a list, perhaps called 
SORTLIST(aList, ASC | DESC). This would particularly useful when combined with 
the aggregate LIST function.

SELECT SORTLIST('A, C, B')  FROM RDB$DATABASE.... -> Should return CONSTANT:  
"A, B, C"

Please note this would solve CORE-2332 as you could:

SELECT SORTLIST(LIST(MY_COL)) FROM ... to get a sorted version of an aggregated 
list.

It would also solve CORE-2106:

SELECT HASH(SORTLIST(LIST(MY_COL))) FROM... to get a checksum based on an 
aggrageted query (ie determine quickly if any of the value in MY_COL have 
changed. This currently is not possible since the order that LIST returns is 
undefined.

Would also be useful if we implemented CORE-4335. (non-aggregate version of 
LIST (LISTVALUE())

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to