Use string manipulation functions such as Concat() to modify strings, combine multiple values into a single value, parse strings, and more.
In our example, we show two methods side-by-side. In the first (m1), we use Concat() to combine the string literal “Method 1: “ with the “name” column from the xactly.xc_period table. In the second example, we use the double pipe (||) method to accomplish the same task.
1 SQL> select Concat(‘Method 1: ‘, name) m1, ‘Method 2: ‘ || name m2 from xactly.xc_period limit 15;
In our next exercise, we use IndexOf(), Length(), and SubString() to parse the year from a period name:
1 SQL> select ‘APR-2015’ orig_string,
IndexOf(‘APR-2015’, ‘-‘) index_of_dash,
Length(‘APR-2015’) len_of_orig_string,
SubString(‘APR-2015’, IndexOf(‘APR-2015’, ‘-‘) + 1, Length(‘APR-2015’)) parsed_the_year
from Empty(rows=3);