Yelena Varshal (1/10/2008)
Saving query results in other formats is tricky! Somebody here on this forum answered to me, so I am not entitled to a credit. Here is how to do it in Management Studio:
Run a query, right-click results, select "Save Results As", in the "Save Grid Results" dialog select the folder to save and specify the file name. As soon as you enter the file name, the Save button becomes enabled. It has a very little arrow on the right. Click this arrow. Select "Save With Encoding" option. The new dialog opens with the "Available Encoding" selection. Select ANSI or Unicode or Chinese.
Thanks. I'll definitely try this.
I also suggest to create a SSIS job for the original postwer here who would lik the automatic output. You can change the output types in SSIS
I'm sorry I'm so new to this. This is exactly what I'd like to do as I need to automate this process so I don't have to do it every night. What is SSIS?
For my job I'll need:
1) Connect to connected server (I'm an admin on one server, but need to get data from another server - and don't have admin rights on that one - but I can read the table I need).
2) Execute Query
3) Cut last 2 lines (showing rows returned, and blank formatting lines)
4) Save results to ANSI file
Let us know if it helped.