DynDeveloper.com

DynDeveloper.com

Sign Up Now! Log In
RuthO 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

 

Version: Unknown or N/A
Section: SQL Scripts