DB2 Connector - Connection Settings Query - Possible Limitations?

I'm wondering if there are any limitations with the DB2 connector. If so, what are they?

I made a custom query when connecting and receive an error about the query being invalid.

In the query I am trying to use Db2 LISTAGG() Aggregate Function. According to the db2 programmers, the query is valid and returns data. However, when trying to run the same code in the Synchronization Service, I get an error about the query being invalid.

I'm wondering if the sync service has a limitation in running this or if I'm doing something wrong. Running on version 7.4.3.

SELECT
    a.TRFG_ID,
    LISTAGG(RTRIM(a.TRFG_TEXT),',') trg_text
FROM
    TEST.RACF5 a
GROUP BY
    a.TRFG_ID

Parents
  • I'm more of a SQL guy myself but my gut tells me that one thing that may be problematic is that comma inside the single quotes.  Is there any way you can express that differently?  For example, can you escape the comma or, does DB2 have something similar to SQL's "CHAR" function - i.e. in SQL, if I want to express a comma in an alternative way I could say CHAR(44).

Reply
  • I'm more of a SQL guy myself but my gut tells me that one thing that may be problematic is that comma inside the single quotes.  Is there any way you can express that differently?  For example, can you escape the comma or, does DB2 have something similar to SQL's "CHAR" function - i.e. in SQL, if I want to express a comma in an alternative way I could say CHAR(44).

Children