How to write or append to text file using sql?
18,681
by the following way you can do this
exec master..xp_cmdshell 'echo pranay test application > d:\file.txt'
more about this : http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/how-to-copy-data-append-data-into-files-
Author by
aron
Full stack software developer. In day to day work using these technologies: C#, ASP.NET, SQL, JavaScript, TypeScript, AngularJS
Updated on June 05, 2022Comments
-
aron almost 2 years
i need to call sqlcmd from stored procedure to export table to text file?