RuthO
4Penny.net
Points: 7933

7/31/2012 3:05:11 PM

SQL - Write to a text file

* This article, and all our great SQL (General) documentation, Is available on the SQL (General) menu

I've long used this method to write files to the file system using SQL.

This method employs the SQL  sp_OACreate and sp_OAMethod procs to do the writing. Now in SQL 2012 that method is not working for me. I switched to the XP_CommandShell method and that works fine.

So, here is the documentation of how to write a text file using XP_CommandShell

 

4Penny.net
Version: Unknown or N/A
Section: SQL Scripts
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3