No way exists to directly write to a text file from a stored procedure. There are several ways to indirectly output text from a SP. Check the info in the SQL FAQ at
Why not use DTS? Terry Broadbent
"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
You may use one system extended stored procedure xp_cmdshell. This procedure allows you to gain access to system commands so what do you want.
Another way is to use sp_OaCreate who permets you to create com objects so you may use windows scripting host to acomplish your task.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.