Hello DB2 Expert,
Here a little big problem
Table to contain source data
Expected Result set
There are not fixed values about the number of same CODFORN number.
This topic has been locked.
Pinned topic DB2 SQL a Little Big Problem
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Re: DB2 SQL a Little Big Problem2013-03-27T23:35:02ZThis is the accepted answer. This is the accepted answer.What you are describing is possibly a PIVOT table. (https://www.ibm.com/developerworks/mydeveloperworks/blogs/SQLTips4DB2LUW/entry/pivoting_tables56?lang=en)
Are you looking at getting a result set with multiple columns representing CODCOMP, or a single VARCHAR concatenated CODCOMP field?
Re: DB2 SQL a Little Big Problem2013-03-27T23:48:50ZThis is the accepted answer. This is the accepted answer.
Re: DB2 SQL a Little Big Problem2013-03-28T13:16:11ZThis is the accepted answer. This is the accepted answer.