You can translate the question and the replies:

I do not have a finite number of values to include "cases" on to create new columns

I have scenario where the number unique values in the column (questionid) could keep getting larger. so I can't set up a static list of CASE conditions is there a way to dynamically take the column value for question id and put it across the top of the results has a head with the first value from that row as the cell below it? thre is another id value for the overal report just called I that would be the left had column. so I want to go from this | id | questionid | answer | -------- | -------- | -------- | | 1 | 1 | abc | | 1 | 2 | efg | | 1 | 3 | hij | to this (if possible adding q to the column header: | id | q1| q2 | q3 | -------- | -------- | -------- | -------- | | 1 | abc | efg | hij | The number of ids and question ids can keep growing in the data source so this CAN'T be hardcoded.
13-08-2021 10:26:33 -0400

2 Answers

Hi , As far as I am aware natively with Denodo its not possible. You may have to create custom stored procedure in Java with procedueral logic to transpose rows to columns. Will let Denodo experts to comment. Regards, DuDe
13-08-2021 11:46:45 -0400
Hi, Yes, for this specific scenario it would be best to create a custom stored procedure to accomplish your purposes. Because in Denodo, it is not possible to dynamically transpose rows to columns in this way. For an overview of custom stored procedures please check out the [Developing Stored Procedures]( section of Virtual DataPort Developer Guide. If you have a valid support user account, please open a new support case at so that the support team can review the question in detail. Hope this helps!
Denodo Team
16-08-2021 11:08:24 -0400
You must sign in to add an answer. If you do not have an account, you can register here