8 ms·
> should be a presentation-time decision, not a query-time decision Agree, but sometimes you just need to shove the results of a SQL query into an Excel file a
by tomnipotent 3y ago
> should be a presentation-time decision, not a query-time decision
Agree, but sometimes you just need to shove the results of a SQL query into an Excel file and you don't want to get fancy.
You're either 1) overwriting Sheet B and then using a pivot table in Sheet A to get the final presentation, 2) pivoting in the code/program executing the query before writing to Excel or 3) pivoting in SQL and skipping the code and Excel pivot table altogether.
I run into this a lot with data used for financial modeling, or financial reporting that heavily relies on using dates/categories as column/row headers.