db2 - Is there a way to Concat multiple rows into one but keep each column value as a seperate column? -
i know possible want listagg adds of values 1 column.
for example if have this
subjectid studentname ---------- ------------- 1 mary 1 john 1 sam 2 alaina 2 edward i hoping this
subjectid studentname studentname1 studentname2 ---------- ----------- ------------ ------------ 1 mary john sam 2 alaina edward 0
this called pivoting , described in article
Comments
Post a Comment