I am trying to execute the dynamic query in SSIS.
When I try the following statement
EXECUTE(@dynamicquery)
It throws error and suggests to use WITH RESULT SETS
But in my case the result schema also dynamic
EXECUTE(@query) WITH RESULT SETS ((@resultsschema));
And this is not correct syntax.
Is there any other way to achieve this problem?