Wondering if anyone can shed some light on the possibilies of having a list() in a case statement. ex:
couldn't find any documentation and the list() function seems a bit limited from the documents info. Appreciate your help. I'm using sql anywhere 11. Comment Text Removed
|
LIST does work in a CASE expression. The following is a (not very useful) sample:
Note, however, that LIST is an aggregate function, i.e. the [field] you refer to in the CASE WHEN expression must be part of the GROUP BY clause. That's the reason I used "GROUP BY creator". As to your notation of (list[y], [z]): Note that LIST is not a string concatenation, instead it lists all particular values per group. A simple string concatenation can be done with operator || (as in the sample) or the STRING function. answered 24 Feb '11, 16:55 Volker Barth Volker, great stuff with the ||. That did the trick. And, I appreciate the notes on LIST. Helped tremendously. Thanks again |