How can I write or append to a text file using sql?

Do I need to call sqlcmd from a stored procedure to export a table to a text file?

+2


a source to share


1 answer


as follows you can do it

exec master..xp_cmdshell 'echo pranay test application > d:\file.txt'

      



more on this: http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/how-to-copy-data-append-data-into-files-

+5


a source







All Articles