Subject How to return a result set of unknown number of columns from an Execute Block?
Author Paul Read
(First question to the group, so please excuse any incorrect protocol)

Firebird 3.x SQL

Trying to transpose a result set from rows to columns but I don't know the transposed column titles at design time, so I've created  an execute block to dynamically create the sql to perform the transpose.  However I also don't know the number of columns there will be in the final result set, so I'm stuck as the execute block seems to demand prior knowledge of the type and number of columns.

Is there a way to return from an execute block a result set with an unknown number of columns?

Thanks
Paul Read
nSolve Ltd