Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1139
| From | "Cathy" <Cathy@Nospam.com> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | MSSMSE - Export results to CSV |
| Date | 2012-06-21 19:24 +0100 |
| Message-ID | <5oudnZwNaMRT-37SnZ2dnUVZ8g-dnZ2d@bt.com> (permalink) |
I regularly run a complex script manually in MSSMSE. The results shown in Grid I then right click on the top left corner of the grid and select "Save results as" and then save it as a CSV file. The above works just as I want it to and the saved CSV file is just as I would expect to see it. But I have to do this for a large number of queries on all databases on the server which is very time consuming. I have tried saving the script and running it with osql (sorry should have mentioned earlier this is still an old SQL2000 server) But unfortunately the resultant CSV file seems to have a lot of blank spaces and wraps lines and just is not in the same CSV format as that exported in first step. I am therefore wondering if there is not a way in which I could add something into the SELECT statement to save reults to CSV file and hope the results come out in the same format, I have also tried altering settings to save results to file instead of GRID but this also comes out in a different format. If anybody has tried to do this before and come accross a solution for this I will really appreciate it. Regards C
Back to comp.databases.ms-sqlserver | Previous | Next — Next in thread | Find similar
MSSMSE - Export results to CSV "Cathy" <Cathy@Nospam.com> - 2012-06-21 19:24 +0100
Re: MSSMSE - Export results to CSV Erland Sommarskog <esquel@sommarskog.se> - 2012-06-21 23:40 +0200
Re: MSSMSE - Export results to CSV "Cathy" <Cathy@Nospam.com> - 2012-06-22 00:00 +0100
Re: MSSMSE - Export results to CSV Erland Sommarskog <esquel@sommarskog.se> - 2012-06-22 11:33 +0200
Re: MSSMSE - Export results to CSV "Cathy" <Cathy@Nospam.com> - 2012-06-22 18:48 +0100
Re: MSSMSE - Export results to CSV Erland Sommarskog <esquel@sommarskog.se> - 2012-06-22 20:38 +0200
Re: MSSMSE - Export results to CSV "Cathy" <Cathy@Nospam.com> - 2012-06-22 22:45 +0100
Re: MSSMSE - Export results to CSV Erland Sommarskog <esquel@sommarskog.se> - 2012-06-23 11:28 +0200
Re: MSSMSE - Export results to CSV "Cathy" <Cathy@Nospam.com> - 2012-06-23 23:49 +0100
csiph-web