Hi,
How do we transfer the content of a string variable to a file on a SP? I need to do these:
- Create an empty text file from an SP
- Push the content of a variable (whose len is 25487) to the newly created file
The variable size is Varchar(Max), and this is the code I am trying to make work (but it ain't [Sad] ) ---
Declare @cmd sysname Declare @ReqContent Varchar(max)
SET @cmd = 'echo ' + @ReqContent + ' > C:\DD4TRD.txt' EXEC master..xp_cmdshell @cmd ,NO_OUTPUT
Thanks, Sayan