Subject | [firebird-support] Re: Full Cross Tab but unknown column headers |
---|---|
Author | Svein Erling Tysvær |
Post date | 2014-01-08T08:42:28Z |
>By the way, google's query language has a PIVOT syntax:I agree, Maya, I would even say that if it was possible to return rows from EXECUTE BLOCK without having to specify the RETURNS clause, that it would be a good start (if EXECUTE BLOCK just returned the last executed statement, then Bhavbhuti could possibly use EXECUTE BLOCK ... FOR EXECUTE STATEMENT :MyDynamicallyCreatedStatement DO SUSPEND; ...).
>
>https://developers.google.com/chart/interactive/docs/querylanguage#Pivot
>
>Eg.
>
>select sum(salary) pivot dept
>
>Would be nice if Firebird could do the same, I understand you couldn't use it inside a
>stored procedure, where your columns need to be known up front, but your could use it
>to query your selectable stored procedure, which would be very nice ;-)
However, such a change would also mean that you wouldn't know the field structure of the result before you actually execute the statement (today you know it once the query is prepared), and it wouldn't surprise me (I know nothing about the Firebird code) if that would be a change with undesirable side effects.
Set