Here is my query:
PARAMETERS ...
TRANSFORM ...
SELECT ...
...
PIVOT Mytable.type In ("Other","Info");
This is a cross query and I need to set all the column headings with this row: PIVOT Mytable.type In ("Other","Info")
and now I have hard-coded the headings, Other and Info.
But I want to do this dynamically. So what I want to do is to call a vba-function that returns all the headings I need.
Something like this:
PIVOT Mytable.type In (myVbaFunction());
So my question is: How to call a vba-function inside the sql-query?