SQL Sequence Concatenation Function

The seq_concat() function returns a sequence that contains the elements of sequence 1 followed by the elements of sequence 2.

Following is an example script demonstrating the seq_concat() function:

 
    INSERT INTO SimpleSequence(testNumber,iVal1,iVal2)
    VALUES(2,'{1}','{2,3}');
     
    SELECT iVal1,iVal2,seq_concat(iVal1,iVal2) AS "concat" FROM SimpleSequence
    WHERE testNumber=2;
     
    iVal1
    iVal2
    concat
    --------------------------
    {1}
    {2, 3}
    {1, 2, 3}
     

Sample script

A sample script to demonstrate this select statement using xSQL can be run from the samples/xsql/scripts/financial directory with the following command:

     
    f 5