This content has been marked as final.
Show 3 replies
-
1. Re: 'concat' when no of rows is not fixed
shawkins Oct 8, 2015 9:30 AM (in response to prashanthi1)You would use the string_agg or array_agg aggregate function - https://docs.jboss.org/author/display/TEIID/Expressions
-
2. Re: 'concat' when no of rows is not fixed
prashanthi1 Oct 8, 2015 10:12 AM (in response to shawkins)Thanks for the link Steven,
I tried string_agg function, but it is combining all the values present. i am not able to do any filter.
I modified my ex tables in my question, if i have many ids, and number of rows for these ids are not fixed, how do i get the output?
-
3. Re: 'concat' when no of rows is not fixed
shawkins Oct 8, 2015 10:34 AM (in response to prashanthi1)> I tried string_agg function, but it is combining all the values present.
Are you grouping the values by id? For example:
select string_agg("value", ',') as "value", id from table group by id
> i am not able to do any filter.
What filtering are you looking to do?