Search code examples
wso2wso2-data-services-serverwso2-esb

WSO2 Data Service merge two columns?


I've created a query that returns a set of results and I would like to merge two of the columns is this possible and whats the best way to do it. So for example I have two columns Value and Units.

Value | Units
1       Year(s)

What I want to do is merge these columns into one so it would become

Length |
1 Year(s)

Solution

  • I solved this by merging the columns within my SQL statement. Example of the SQL statement is like this:

    Select col1, col2 || ' ' || col3, from table
    

    The above statement merges col2 and col3 and adds a space between them.