How do I export AAI SQL Server query results to a CSV file with headers?
search cancel

How do I export AAI SQL Server query results to a CSV file with headers?

book

Article ID: 197173

calendar_today

Updated On: 08-13-2020

Products

Automic Automation Intelligence

Issue/Introduction

How do I export AAI SQL Server query results to a CSV file with headers?

Environment

Release : 6.0.1

Component : AUTOMIC AUTOMATION INTELLIGENCE ENGINE

Resolution

  1. In SQL Management Studio Go to Tools > Options
  2. Navigate to Query Results > SQL Server > Results to Grid, then check “Include column headers when copying or saving the results” option:

  3. Click OK to save changes, close and restart SSMS to apply changes
  4. After running the query, go to the Results area and right click and select "Save Results As..." and save as a .csv file

Optionally you can right click on the results and choose "Select All" and then "Copy with headers", and past into Excel.