It's all about the answers!

Ask a question

Attempting to print multiple attribute values in one row in JRS 6.0.3


carey mickelson (6) | asked Aug 23 '17, 1:08 p.m.

 Greetings!


I'm attempting to put together a JRS report that lists the (comma separated) multiple attribute values for each record in one row, instead of a row for each value. 

Here's what I have...

SELECT DISTINCT T1.REFERENCE_ID, 
       T2.VAL AS VAL, 
       T3.LITERAL_NAME AS LITERAL_NAME 
FROM RIDW.VW_REQUIREMENT T1 
LEFT OUTER JOIN RICALM.VW_RQRMENT_STRING_EXT T2 
ON T2.REQUIREMENT_ID=T1.REQUIREMENT_ID AND T2.NAME='CSSS Tag' 
  LEFT OUTER JOIN RICALM.VW_RQRMENT_ENUMERATION T3 
  ON T3.REQUIREMENT_ID=T1.REQUIREMENT_ID AND T3.NAME='Variant' 
WHERE T1.PROJECT_ID = 15  AND 
(  T1.REQUIREMENT_TYPE = 'CSSS' AND 
  LOWER(T2.VAL) LIKE '%csss1.03%' 
) AND 
(T1.ISSOFTDELETED = 0) AND 
(T1.REQUIREMENT_ID <> -1 AND T1.REQUIREMENT_ID IS NOT NULL) <o:p> </o:p>


The attribute called 'Variant' is the source of the multiple values. 

I'm trying to find the correct function and syntax to make this happen. Can't seem to get LISTAGG to work, and can't find the right syntax for CONCATENATE to make that work either. 

Any clues?

Thanks in advance.

Be the first one to answer this question!


Register or to post your answer.