microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.58k stars 908 forks source link

Include query as second sheet in export to Excel #25946

Open schutzie opened 1 month ago

schutzie commented 1 month ago

When exporting results of a query to Excel include the text of the query (SQL) as a second sheet in the file. Ideally the second sheet would just be called "SQL", and the would also be nice to label the results sheet as "Data".

I often export many query results, often very similar with basic changes like filters, etc. when testing and having the query for reference automatically in the exported Excel file would be very helpful.

No alternatives found except manual copy/paste of the query.