February 1, 2019 at 6:27 am
Hi Experts,
I have three different queries which returns three different sets of data with different column names/number of columns from different tables.
Is it possible to export all the three query results to SAME CSV file and in SAME SHEET (Or Excel) ?
If not, can we export all the three query results to SAME CSV at least (may be different sheets)
T-SQL or Powershell is OK.
I have a poweshell script which exports data into excel, by creating "excel" application object.
However it's not possible for us to install excel in the server. CSV is ideal in our environment.
Please suggest. Thanks !.
February 1, 2019 at 9:47 am
CSV files are text files. They do not have sheets.
Three separate data flows, in series, to the same file, should do it.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 3, 2019 at 5:36 am
its also possible with OpenXML and a script task, but the learning curve to learn to get that right is pretty steep.
once you have it though, you can decide whether multiple query results go on the same sheet, different worksheets, or a combination.
unless you need formatting and colors and the like, i like Phil's suggestion of simple. clean, CSV files.
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply